Project

General

Profile

Permissions System

install.xml

<objects>
    <object pre_object="pages" object="restate_index" action="add" access="1">Submit Listing</object>
<objects>

pre_object - it's a group of permissions. Example: pages, admins_pages
object - title of the access privileges
action - action type on this page
access - default value, allow/deny values
"text" - human title for the permission

Add privileges

<permissions>
    <object type="group" type_id="4" object_id="restate_account" access="0" action="read">pages</object>
</permissions>

Type - 'group' or 'user'. set privileges for usergroup or a single user.
Type_id - id of the chosen type. Standard groups have hardcoded IDs.
object_id - name of the permission, created by object tag
access - deny or allow, integer value
action - action add|view|etc.
"text" - privileges group. Example: pages, admin_pages

Related tables

acl_objects:

pre_object
object
action
access
extras

acl_privileges:

type
type_id
object_id
access
action
extras

Example:
We want to create extra privileges for Manage Database page. We add them for the HOOKs section. In order to configure this we need to use the following XML settings:

<object pre_object="admins_pages" object="database_manage" action="hooks" access="0">Manage Database: hooks</object>

We should use the following code in PHP to check for the privileges:

if(!$iaAcl->checkAccess($permission.'hooks'))
{
}

$permission would be equal to 'admins_pages-database_manage:'