Kronolith_Calendar::hasPermission PHP Метод

hasPermission() публичный Метод

Encapsulates permissions checking.
public hasPermission ( integer $permission, string $user = null, string $creator = null ) : boolean
$permission integer The permission to check for.
$user string The user to check permissions for. Defaults to the current user.
$creator string An event creator, to check for creator permissions.
Результат boolean Whether the user has the permission on this calendar.
    public function hasPermission($permission, $user = null, $creator = null)
    {
        switch ($permission) {
            case Horde_Perms::SHOW:
            case Horde_Perms::READ:
                return true;
            default:
                return false;
        }
    }