Project

General

Profile

h1. Permissions System

h2. install.xml

Submit Listing

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


pages

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

h2. 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:

Manage Database: hooks

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:'