NAME

ePortal::ThePersistent::ExtendedACL - Extended Access Control Lists base class for persistent objects.

SYNOPSIS

ePortal::ThePersistent::ExtendedACL implements Access Control Lists (ACL functions) for ThePersistent classes.

METHODS

initialize()

Overloaded method. Adds ACL specific attributes uid and xacl_read to the object.

Additional parameters:

  • XACL_Attributes

    Additional XACL attributes. Attribute data type is selected automatically.

    xacl_attribute => description
  • XACL_ON_PARENT

    Do not add special attributes uid and xacl_read.

  • xacl_uid_field

    Redefine standard uid attribute name to something another.

  • xacl_read_field

    Redefine standard xacl_read attribute name to something another.

  • 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_where()

Construct SQL WHERE clause based on uid and xacl_read fields.

xacl_check()

Base XACL checking function. Omit using it in end packages, use xacl_check_xxx() for specific XACL processing.

xacl_check_read()

read access. This method is not used inside of ExtendedACL 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.

restore_where()

Adds some WHERE conditions to comply with ACL.

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 ExtendedACL attributes from this object to all childrens

AUTHOR

Sergey Rusakov, <rusakov_sa@users.sourceforge.net>