NAME

AccessControllable - access controllable component interface (super class)


DESCRIPTION

Every component in the access control mechanism should inherit from AccessControllable super class.

The properties of AccessControllable are: access_owner virtual component of type AccessUser, access_group virtual component of type Access_group, access_owner_perms, access_group_perms, access_other_perms, all 3 of type AccessPermissions.


REQUIREMENTS

the Podius::Component::Publishable manpage, the Podius::Property::VComponent manpage, the Podius::Property::AccessPermissions manpage, the Podius::Property::AccessUser manpage, the Podius::Property::Access_group manpage, the Exception manpage.


METHODS

set_access_data

description
Sets access control specific component properties.

parameters
All parameters are optional,
  * owner - AccessUser component
  * group - AccessGroup component
  * owner_perms - AccessPermissions
  * group_perms - AccessPermissions
  * other_perms - AccessPermissions

returns
None.

set_access_owner

description
Sets access control specific component properties.

This is a convenient shortcut method to set_access_data, all other properties (group, owner_perms, group_perms, other_perms) are initialized from the corresponding default properties of the given AceessUser component (owner).

parameters
  * owner - AccessUser component
returns
None.

is_authorized

description
Checks if the given access user has the given access permissions on this component.

parameters
  * user - AccessUser component
  * permissions - integer, the composition of single permission flags,
see B<Podius::Property::AccessPermissions>
returns
1 if authorized, 0 otherwise.

verify_access

description
Checks if the given access user has the given access permissions on this component. Throws the class exception if no permissions.

parameters
  * user - AccessUser component
  * permissions - integer, the composition of single permission flags,
see B<Podius::Property::AccessPermissions>
returns
None.