Skip navigation.
Home
Openness protects your investment.

POGI 0.2.1

OpenGroupware | PHP

POGI 0.2.1 has been released. You can download it here or here. The OGoManager superclass now provides a setPermission method for modifying the ACLs on objects. A working getShortId() method has also been added to the OGoTeam object.

New required configuration value
$GLOBALS['ogoConfig']['NumberPrefix'] = 'OGo';

Change the value of this is you have altered the value of the Number prefix via defaults. The code needs to know this so we can strip it from then number to produce a short ids for the team as the team objects do not contain an id value - and you have to use the id value when calling the access methods (See Bug#844).

New methods

OGoTeam::getShortId()
OGoManager::setPermission($_obj, $_ent, $_perm = '')

Example
To set contact 10100 to read only for object 26850

$server = new OGoServer('*************', '/RPC2', 80);
// Set you user credentials - username, password
$server->login('************', '***********');
// Create A Task Manager Object
$contactManager = $server->getPersonManager();
$contact = $contactManager->getById(10100);
$contactManager->setPermission($contact, array(26850), 'r');

_obj is either an OGoPerson or an OGoEnterprise. If the object is neither of these types this method silently does nothing.
_ent is an array of object ids, either accounts or teams.
_perm can be "", "r" or "rw"

You can also specify an $_ent as null, like:
$contactManager->setPermission($contact, null, '');
This will apply the specified permissions to the object for all of the teams the current user is a member of.