Documentation

Horde_Core_Perms
in package

The Horde_Core_Perms class provides information about internal Horde elements that can be managed through the Horde_Perms system.

Copyright 2001-2017 Horde LLC (http://www.horde.org/)

See the enclosed file LICENSE for license information (LGPL). If you did not receive this file, see http://www.horde.org/licenses/lgpl21.

Tags
author

Chuck Hagenbuch chuck@horde.org

author

Jan Schneider jan@horde.org

category

Horde

Table of Contents

Properties

$_appPerms  : array<string|int, mixed>
Caches information about application permissions.
$_perms  : Horde_Perms_Base
A permissions instance.
$_registry  : Horde_Registry
A registry instance.

Methods

__construct()  : mixed
Constructor.
getApplicationPermissions()  : array<string|int, mixed>
Returns information about permissions implemented by an application.
getAvailable()  : array<string|int, mixed>
Returns the available permissions for a given level.
getParams()  : array<string|int, mixed>
Given a permission name, returns the parameters for that permission.
getTitle()  : string
Given a permission name, returns the title for that permission by looking it up in the applications's permission api.
getType()  : string
Given a permission name, returns the type for that permission.
hasAppPermission()  : mixed
Finds out if the user has the specified rights to the given object, specific to a certain application.
newPermission()  : Horde_Perms_Permission
Returns a new permissions object.

Properties

$_appPerms

Caches information about application permissions.

protected array<string|int, mixed> $_appPerms

$_perms

A permissions instance.

protected Horde_Perms_Base $_perms

Methods

__construct()

Constructor.

public __construct(Horde_Registry $registry, Horde_Perms_Base $perms) : mixed
Parameters
$registry : Horde_Registry
$perms : Horde_Perms_Base
Tags
params

Horde_Registry $registry

params

Horde_Perms_Base $perms

getApplicationPermissions()

Returns information about permissions implemented by an application.

public getApplicationPermissions(string $app) : array<string|int, mixed>
Parameters
$app : string

An application name.

Return values
array<string|int, mixed>

Hash with permissions information.

getAvailable()

Returns the available permissions for a given level.

public getAvailable(string $name) : array<string|int, mixed>
Parameters
$name : string

The permission's name.

Tags
throws
Horde_Perms_Exception
Return values
array<string|int, mixed>

An array of available permissions and their titles or false if not sub permissions exist for this level.

getParams()

Given a permission name, returns the parameters for that permission.

public getParams(string $name) : array<string|int, mixed>
Parameters
$name : string

The permissions's name.

Return values
array<string|int, mixed>

The paramters for the permission.

getTitle()

Given a permission name, returns the title for that permission by looking it up in the applications's permission api.

public getTitle(string $name) : string
Parameters
$name : string

The permissions's name.

Return values
string

The title for the permission.

getType()

Given a permission name, returns the type for that permission.

public getType(string $name) : string
Parameters
$name : string

The permissions's name.

Return values
string

The type for the permission.

hasAppPermission()

Finds out if the user has the specified rights to the given object, specific to a certain application.

public hasAppPermission(string $permission[, array<string|int, mixed> $opts = array() ]) : mixed
Parameters
$permission : string

The permission to check.

$opts : array<string|int, mixed> = array()

Additional options:

'app' - (string) The app to check.
        DEFAULT: The current pushed app.
'opts' - (array) Additional options to pass to the app function.
         DEFAULT: None
Return values
mixed

The specified permissions.

newPermission()

Returns a new permissions object.

public newPermission(string $name) : Horde_Perms_Permission

This must be used instead of Horde_Perms_Base::newPermission() because it works with application-specific permissions.

Parameters
$name : string

The permission's name.

Return values
Horde_Perms_Permission

A new permissions object.


        
On this page

Search results