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 to the object.
ACL_attributes(prefix)
Returns array in array context or comma separated string for all ACL specific attributes. This is static function but may be called in OOP manner.
If prefix
given than every attribute is prefixed
ACL_attributes('t') => 't.uid, t.gid, ...'
value(...)
There is no way to modify ACL attributes with standard ->value() function. Use set_acl() instead. This overloaded function just makes ACL attributes read-only.
insert()
Overloaded function. Calls acl_check_insert() to check access for object creation.
Installs default ACL with set_acl_default().
delete()
Calls acl_check('w') for access.
restore_where()
Adds some WHERE conditions to comply with ACL.
restore_next()
Additional but not paranoid checks for ACL
update()
Calls acl_check('w') for access.
acl_check(right)
Checks the object for ACL with right
. right
may be r|w|a.
acl_check_insert(system_acl_name)
Checks parent of the object for acl_check('w')
or sysacl_check(system_acl_name)
set_acl_default()
Installs default ACL values for the object during insert(). The default behavior is to take ACL from parent.
This method updates uid
if not defined and set all_r
to 1.
This method does not updates the object. insert()
does it.
set_acl()
Modifies ACL values for the object. This is the only way to modify ACL.
Parameter is a hash
set_acl(uid => username, gid => groupname, all_r => 1)
set_acl() modifies only stated as parameters attributes. Others are stay unchanged.
This method does not updates the object. Call update()
manually!
set_acl_from_obj($source)
Copy all ACL attributes from $source
object.
This method does not updates the object. Call update()
manually!
set_acl_r()
The same as set_acl()
but does this recursive on the object and its children.
This method UPDATES the object. Call update()
manually!
AUTHOR
Sergey Rusakov, <rusakov_sa@users.sourceforge.net>