Class Horde_Core_Perms
The Horde_Core_Perms class provides information about internal Horde
elements that can be managed through the Horde_Perms system.
Copyright 2001-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (LGPL). If you
did not receive this file, see http://www.horde.org/licenses/lgpl21.
Methods summary
public
|
#
__construct( Horde_Registry $registry, Horde_Perms_Base $perms )
Constructor.
Params
Horde_Registry $registry
Horde_Perms_Base $perms
|
public
array
|
#
getAvailable( string $name )
Returns the available permissions for a given level.
Returns the available permissions for a given level.
Parameters
- $name
- The permission's name.
Returns
array An array of available permissions and their titles or
false if not sub permissions exist for this level.
Throws
Horde_Perms_Exception
|
public
string
|
#
getTitle( string $name )
Given a permission name, returns the title for that permission by
looking it up in the applications's permission api.
Given a permission name, returns the title for that permission by
looking it up in the applications's permission api.
Parameters
- $name
- The permissions's name.
Returns
string The title for the permission.
|
public
string
|
#
getType( string $name )
Given a permission name, returns the type for that permission.
Given a permission name, returns the type for that permission.
Parameters
- $name
- The permissions's name.
Returns
string The type for the permission.
|
public
array
|
#
getParams( string $name )
Given a permission name, returns the parameters for that permission.
Given a permission name, returns the parameters for that permission.
Parameters
- $name
- The permissions's name.
Returns
array The paramters for the permission.
|
public
Horde_Perms_Permission
|
#
newPermission( string $name )
Returns a new permissions object.
Returns a new permissions object.
This must be used instead of Horde_Perms_Base::newPermission() because
it works with application-specific permissions.
Parameters
- $name
- The permission's name.
Returns
Horde_Perms_Permission A new permissions object.
|
public
array
|
#
getApplicationPermissions( string $app )
Returns information about permissions implemented by an application.
Returns information about permissions implemented by an application.
Parameters
- $app
- An application name.
Returns
array Hash with permissions information.
|
public
mixed
|
#
hasAppPermission( string $permission, array $opts = array() )
Finds out if the user has the specified rights to the given object,
specific to a certain application.
Finds out if the user has the specified rights to the given object,
specific to a certain application.
Parameters
- $permission
- The permission to check.
- $opts
- Additional options:
<pre><span class="php-quote">'app'</span> - (string) The app to check.
<span class="php-keyword1">DEFAULT</span>: The <span class="php-keyword2">current</span> pushed app.
<span class="php-quote">'opts'</span> - (<span class="php-keyword1">array</span>) Additional options to pass to the app <span class="php-keyword1">function</span>.
<span class="php-keyword1">DEFAULT</span>: None</pre>
Returns
mixed The specified permissions.
|