Turba_Driver::hasPermission PHP Method

hasPermission() public method

Checks if the current user has the requested permissions on this address book.
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;
    }

Usage Example

コード例 #1
0
ファイル: Object.php プロジェクト: raz0rsdge/horde
 /**
  * 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);
 }