ePages 7.48.0 - DE_EPAGES/Permission/API/Object/Trustee.pm

Package DE_EPAGES::Permission::API::Object::Trustee

object interface for Trustee. Trustee is the base class of DE_EPAGES::Permission::API::Object::Group and DE_EPAGES::Permission::API::Object::User.

Base
DE_EPAGES::Object::API::Object::Object

Functions

attributePermissions
className
dbPackage
delete
deleteXML
deleteXMLEnd
directAttributePermissions
directGroups
groups
importXML
importXMLEnd
isDirectMemberOf
isGroup
isMemberOf
isUser

attributePermissions

Returns a reference to an array of _all_ attribute permissions, including inherited ones through other groups such as Everyone.

Syntax
$ahAttributePermissions = $Trustee->attributePermissions;
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • AttributeID - attribute id - int
  • Permission - readable=2, writable=4 - tinyint

className

Returns the class name, used for DAL access.

Syntax
$ClassName = $Trustee->className;
Return
$ClassName (String)
class name

dbPackage

Returns the database package, used for DAL access.

Syntax
$DbPackage = $Trustee->dbPackage;
Return
$DbPackage (String)
database package name

delete

tigger hook 'OBJ_DeleteTrustee', delete GroupMember and Permission of trustee.

Syntax
$Trustee->delete;
Hook
OBJ_DeleteTrustee
hook parameter keys :
  • Object - this object - object
  • TrusteeID - trustee id - int

deleteXML

calls SUPER, push Trustee on stack.

Syntax
$Trustee = $ObjectPackage->deleteXML($Handler, $hElement, $Class, $hAttributes);
Input
$ObjectPackage (string)
package name of the objects's class
$Handler (object)
xml import handler with support function addObject
$hElement (ref.hash)
XML element structure, see XML::SAX
$Class (object)
class object; the new object will be an instance of this class
$hAttributes (ref.hash)
attributes hash
Return
$Trustee (object)
'imported' object (possible undefined if deleted)

deleteXMLEnd

pop Trustee from stack and calls SUPER.

Syntax
$ObjectPackage->deleteXMLEnd($Handler, $hElement);
Input
$Handler (object)
xml import handler with support function addObject
$hElement (ref.hash)
XML element structure, see XML::SAX

directAttributePermissions

Returns a reference to an array of attribute permissions that only exist for the current object (i.e. trustee).

Syntax
$ahAttributePermissions = $Trustee->directAttributePermissions;
Return
$ahAttributePermissions (reference to array of hashes)
with following keys:
  • AttributeID - attribute id - int
  • Permission - readable=2, writable=4 - tinyint

directGroups

Returns all groups where the trustee is directly assigned to.

Syntax
$aGroups = $Trustee->directGroups;
Return
$aGroups (ref.array.object)
list of group objects

groups

Returns all groups where the user or group is directly or indirectly a member of.

Syntax
$aGroups = $Trustee->groups;
Return
$aGroups (ref.array.object)
list of group objects

importXML

calls SUPER, push Trustee on stack and add trustee to group (outer xml element).

Syntax
$Trustee = $ObjectPackage->importXML($Handler, $hElement, $Class, $hAttributes);
Input
$ObjectPackage (string)
package name of the objects's class
$Handler (object)
xml import handler with support function addObject
$hElement (ref.hash)
XML element structure, see XML::SAX
$Class (object)
class object; the new object will be an instance of this class
$hAttributes (ref.hash)
attributes hash
Return
$Trustee (object)
imported object

importXMLEnd

calls SUPER, pop Trustee on stack.

Syntax
$ObjectPackage->importXMLEnd($Handler, $hElement, $Class, $hAttributes);
Input
$Handler (object)
xml import handler with support function addObject
$hElement (ref.hash)
XML element structure, see XML::SAX

isDirectMemberOf

Returns true if the user or group is directly assigned to the group.

Syntax
$IsMember = $Trustee->isDirectMemberOf( $Group );
Example
if( $Trustee->isDirectMemberOf( $Group ) ) { ... }
Input
$Group (object)
group object
Return
$IsMember (boolean)
true if group member

isGroup

Returns true if the trustee is a group and not a user.

Syntax
$IsGroup = $Trustee->isGroup
Return
$IsGroup (boolean)
true if the trustee is a group

isMemberOf

Returns true if the user or group is directly or indirectly a member of the given group.

Syntax
$IsMember = $Trustee->isMemberOf( $Group );
Example
if( $Trustee->isMemberOf( $Group ) ) { ... }
Input
$Group (object)
group object
Return
$IsMember (boolean)
true if group member

isUser

Returns true if the trustee is a user and not a group.

Syntax
$IsUser = $Trustee->isUser
Return
$IsUser (boolean)
true if the trustee is a user