ePages 6.11.0 - DE_EPAGES/Presentation/API/TLE/PermissionHandler.pm

Package DE_EPAGES::Presentation::API::TLE::PermissionHandler

This tle handler provides permission functionalities for the tle processor. This handler supports the following tle functions:

Functions

HASROLE
ISACTIONALLOWED

HASROLE

Determines, whether the user has a specific role for an object.

Syntax
$Value = $Handler->HASROLE( $Processor, $raParameter );
#HASROLE(#RoleClass, #RoleName, #Object, #User)
Example
#HASROLE("Object", "View")
#HASROLE("Object", "View", #Shop.Object)
#HASROLE("Object", "View", #Shop.Object, #SESSION.User.Object)
Input
$Processor (object)
tle processor
$raParameter (ref.array.array
  • RoleClass - class of the role - string
  • RoleName - name of the role - string
  • Object - object to check for, default is object in current scope
    (optional) - ref.object
  • User - user to check for this role, default is the current
    user (optional) - ref.object
)
first parameter is a loop
Return
$Value (string)
return value

ISACTIONALLOWED

Determines, whether an action is allowed for the given object and user.

Syntax
$Value = $Handler->ISACTIONALLOWED( $Processor, $raParameter );
#ISACTIONALLOWED(#ActionName, #Object, #User)
Example
#ISACTIONALLOWED("View")
#ISACTIONALLOWED("View", #Shop.Object)
#ISACTIONALLOWED("View", #Shop.Object, #SESSION.User.Object)
Input
$Processor (object)
tle processor
$raParameter (ref.array.array
  • ActionName - name of an action - string
  • Object - object of the action, default is object in current scope
    (optional) - ref.object
  • User - user to check for this permission, default is the current
    user (optional) - ref.object
)
first parameter is a loop
Return
$Value (string)
return value