/** * Translates IMSP acl into share permissions and sets them in share. * * @param Horde_Share_Object $share The share to assign perms to * @param string $acl The IMSP acl string. */ protected static function _setPerms(&$share, $acl) { $hPerms = 0; if (strpos($acl, 'w') !== false) { $hPerms |= Horde_Perms::EDIT; } if (strpos($acl, 'r') !== false) { $hPerms |= Horde_Perms::READ; } if (strpos($acl, 'd') !== false) { $hPerms |= Horde_Perms::DELETE; } if (strpos($acl, 'l') !== false) { $hPerms |= Horde_Perms::SHOW; } $share->addUserPermission($GLOBALS['registry']->getAuth(), $hPerms); }