ePages 6.10 - DE_EPAGES/Permission/API/Table/Permission.pm

Package DE_EPAGES::Permission::API::Table::Permission

interface for table Permission

@EXPORT_OK
InsertPermission
UpdatePermission
DeletePermission
GetAllPKeyPermissions
GetAllInfoPermissions
GetInfoPermission
ExistsPermission
GetPKeyPermissionsByObjectID
GetInfoPermissionsByObjectID
GetPKeyPermissionsByTrusteeID
GetInfoPermissionsByTrusteeID
GetPKeyPermissionsByMetaActionID
GetInfoPermissionsByMetaActionID

Functions

DeletePermission
ExistsPermission
GetAllInfoPermissions
GetAllPKeyPermissions
GetInfoPermission
GetInfoPermissionsByMetaActionID
GetInfoPermissionsByObjectID
GetInfoPermissionsByTrusteeID
GetPKeyPermissionsByMetaActionID
GetPKeyPermissionsByObjectID
GetPKeyPermissionsByTrusteeID
InsertPermission
OnDeleteObject
UpdatePermission

DeletePermission

Deletes a(n) Permission.

Syntax
DeletePermission($ObjectID, $TrusteeID, $MetaActionID);
DeletePermission($hPermission); # if $hPermission includes ObjectID, TrusteeID, MetaActionID
Input
$ObjectID (int)
permission object id (part of primary key)
$TrusteeID (int)
trustee id (part of primary key)
$MetaActionID (int)
action id (part of primary key)

ExistsPermission

Returns true if the Permission exists.

Syntax
$exists = ExistsPermission($ObjectID, $TrusteeID, $MetaActionID);
Input
$ObjectID (int)
permission object id
$TrusteeID (int)
trustee id
$MetaActionID (int)
action id
Return
$exists (boolean)
1/0 the Permission exists (yes/no)

GetAllInfoPermissions

Returns all objects of Permission.

Syntax
$ahPermissions = GetAllInfoPermissions();
Return
$ahPermissions (reference to array of hashes)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

GetAllPKeyPermissions

Returns all Permission identifiers.

Syntax
$ahPermissionIDs = GetAllPKeyPermissions();
Return
$ahPermissionIDs (reference to array of hashes)
with following keys:
  • ObjectID - permission object id - int
  • TrusteeID - trustee id - int
  • MetaActionID - action id - int

GetInfoPermission

Returns the Permission by identifier.

Syntax
$hPermission = GetInfoPermission($ObjectID, $TrusteeID, $MetaActionID);
Input
$ObjectID (int)
permission object id (part of primary key)
$TrusteeID (int)
trustee id (part of primary key)
$MetaActionID (int)
action id (part of primary key)
Return
$hPermission (reference to hash)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

GetInfoPermissionsByMetaActionID

Returns objects of Permission by alternate key MetaActionID.

Syntax
$ahPermissions = GetInfoPermissionsByMetaActionID($MetaActionID);
Input
$MetaActionID (int)
action id
Return
$ahPermissions (reference to array of hashes)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

GetInfoPermissionsByObjectID

Returns objects of Permission by primary key element ObjectID, TrusteeID.

Syntax
$ahPermissions = GetInfoPermissionsByObjectID($ObjectID, $TrusteeID);
Input
$ObjectID (int)
permission object id
$TrusteeID (int)
trustee id (optional)
Return
$ahPermissions (reference to array of hashes)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

GetInfoPermissionsByTrusteeID

Returns objects of Permission by alternate key TrusteeID.

Syntax
$ahPermissions = GetInfoPermissionsByTrusteeID($TrusteeID);
Input
$TrusteeID (int)
trustee id
Return
$ahPermissions (reference to array of hashes)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

GetPKeyPermissionsByMetaActionID

Returns primary keys of Permission by alternate key MetaActionID.

Syntax
$ahKeys = GetPKeyPermissionsByMetaActionID($MetaActionID);
Input
$MetaActionID (int)
action id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - permission object id - int
  • TrusteeID - trustee id - int
  • MetaActionID - action id - int

GetPKeyPermissionsByObjectID

Returns primary keys of Permission by primary key element ObjectID, TrusteeID.

Syntax
$ahKeys = GetPKeyPermissionsByObjectID($ObjectID, $TrusteeID);
Input
$ObjectID (int)
permission object id
$TrusteeID (int)
trustee id (optional)
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - permission object id - int
  • TrusteeID - trustee id - int
  • MetaActionID - action id - int

GetPKeyPermissionsByTrusteeID

Returns primary keys of Permission by alternate key TrusteeID.

Syntax
$ahKeys = GetPKeyPermissionsByTrusteeID($TrusteeID);
Input
$TrusteeID (int)
trustee id
Return
$ahKeys (reference to array of hashes)
with following keys:
  • ObjectID - permission object id - int
  • TrusteeID - trustee id - int
  • MetaActionID - action id - int

InsertPermission

Creates an entry of Permission.

Syntax
InsertPermission($hPermission);
Input
$hPermission (reference to hash)
with following keys:
  • ObjectID - permission object id (part of primary key)- int
  • TrusteeID - trustee id (part of primary key)- int
  • MetaActionID - action id (part of primary key)- int
  • Allow - allow=1, deny=2 - tinyint

OnDeleteObject

Deletes Permission of this model when a(n) Object is deleted.

Syntax
OnDeleteObject($hParams);
Input
$hParams (ref.hash.*)
primary key of object Object, key is
  • ObjectID

UpdatePermission

Updates a(n) Permission if any element was changed.

Syntax
UpdatePermission($ObjectID, $TrusteeID, $MetaActionID, $hPermission);
UpdatePermission($hPermission); # if $hPermission includes ObjectID, TrusteeID, MetaActionID
Input
$ObjectID (int)
permission object id (part of primary key)
$TrusteeID (int)
trustee id (part of primary key)
$MetaActionID (int)
action id (part of primary key)
$hPermission (reference to hash)
with following keys:
  • Allow - allow=1, deny=2 - tinyint