Author: Gunnar Wrobel (wrobel@pardus.de)
Inheritance: extends Horde_Perms_Permission
Example #1
0
 /**
  * Sets the permissions on the share.
  *
  * @param Horde_Perms_Permission_Kolab $perms  Permission object to folder
  *                                             on the object.
  * @param boolean $update                      Save the updated information?
  *
  * @return NULL
  */
 public function setPermission($perms, $update = true)
 {
     if (!$perms instanceof Horde_Perms_Permission_Kolab) {
         $this->getPermission()->setData($perms->getData());
     } else {
         $this->_permission = $perms;
     }
     if ($update) {
         $this->save();
     }
 }
Example #2
0
 public function testHordeGroupMapsToImapGroup()
 {
     $this->groups->expects($this->once())->method('getName')->with('horde_test')->will($this->returnValue('test'));
     $this->storage->expects($this->exactly(3))->method('getAcl')->will($this->returnValue(array()));
     $this->storage->expects($this->once())->method('setAcl')->with('group:test', 'lriswcd');
     $permission = new Horde_Perms_Permission_Kolab($this->storage, $this->groups);
     $permission->addGroupPermission('horde_test', Horde_Perms::ALL, true);
 }