public hasPermission ( integer $perm ) : boolean | ||
$perm | integer | The permission to check for. |
return | boolean | True if the user has permission, otherwise false. |
public function hasPermission($perm)
{
$perms = $GLOBALS['injector']->getInstance('Horde_Perms');
return $perms->exists('turba:sources:' . $this->_name) ? $perms->hasPermission('turba:sources:' . $this->_name, $GLOBALS['registry']->getAuth(), $perm) : true;
}
/** * Returns whether or not the current user has the requested permission. * * @param integer $perm The permission to check. * * @return boolean True if user has the permission. */ public function hasPermission($perm) { return $this->driver->hasPermission($perm); }