NAME
ePortal::ThePersistent::ACL - Access Control Lists base class for persistent objects.
SYNOPSIS
ePortal::ThePersistent::ACL implements Access Control Lists (ACL functions) for ThePersistent classes.
METHODS
initialize()
Overloaded method. Adds ACL specific attributes properties to the object.
Additional parameters:
drop_admin_priv
By default Admin may SELECT everything from database. If this is not desired then pass this parameter.
drop_admin_priv => 1
xacl_check()
Base ACL checking function. Omit using it in end packages, use xacl_check_xxx() for specific ACL processing.
xacl_check_read()
read
access. This method is not used inside of ACL
but may be used in overloaded packages.
Inside of ExtendedACL
read access is restricted with SQL WHERE clause.
xacl_check_delete()
delete
current object right.
Check xacl_delete
attribute if exists or xacl_check_update()
.
Owner of the object always may delete the object. This is addition to xacl_check()
xacl_check_update()
update
or modify
current object right.
Check xacl_write
attribute.
Owner of the object always may modify the object. This is addition to xacl_check()
xacl_check_admin()
change ACL
on current object right.
Check xacl_admin
attribute if exists or xacl_check_update()
.
Owner of the object always may change ACL if xacl field eq 'owner'. Author of the object does not get xacl_admin rights automatically.
xacl_check_insert()
Actually checks parent with xacl_check_children()
.
The object is obligatory to have a parent or overwrite this method.
xacl_check_children()
ACL check for inserting children objects. Default to xacl_check_update().
This method is called from xacl_check_insert()
of a children object.
set_acl_default()
Installs default ACL values for the object during insert(). The default behavior is to take most of ACL attributes from parent object. Other ACL attributes initialized to 'owner'
This method updates uid
if not defined.
This method does not updates the object. insert()
does it.
set_acl_from_obj()
Copy all ACL attributes from $source
object.
This method does not updates the object. Call update()
manually!
xacl_set_r()
Recursively copy ACL attributes from this object to all childrens
AUTHOR
Sergey Rusakov, <rusakov_sa@users.sourceforge.net>