Actions

API15

JAuthorization/JAuthorization

From Joomla! Documentation

< API15:JAuthorization
Revision as of 07:44, 12 May 2013 by JoomlaWikiBot (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Replacement filing cabinet.png
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.

Contents

Description

Constructor

[<! removed edit link to red link >]

<! removed transcluded page call, red link never existed >

Syntax

JAuthorization($options=NULL)
Parameter Name Default Value Description
$options NULL An arry of options to oeverride the class defaults

Defined in

libraries/joomla/user/authorization.php

Importing

jimport( 'joomla.user.authorization' );

Source Body

function JAuthorization($options = NULL)
{
        parent::gacl( $options );
 
        // ARO value is currently the user type,
        // this changes to user id in proper implementation
        // No hierarchial inheritance so have to do that the long way
        $this->acl = array();
 
        // special ACl with return value to edit user
        $this->addACL( 'com_user', 'edit', 'users', 'super administrator', null, null, '' );
        $this->addACL( 'com_user', 'edit', 'users', 'administrator', null, null, '' );
        $this->addACL( 'com_user', 'edit', 'users', 'manager', null, null, '' );
        // return value defines xml setup file variant
        $this->addACL( 'com_user', 'edit', 'users', 'author', null, null, 'author' );
        $this->addACL( 'com_user', 'edit', 'users', 'editor', null, null, 'author' );
        $this->addACL( 'com_user', 'edit', 'users', 'publisher', null, null, 'author' );
        $this->addACL( 'com_user', 'edit', 'users', 'registered', null, null, 'registered' );
 
        // backend login
        $this->addACL( 'login', 'administrator', 'users', 'administrator' );
        $this->addACL( 'login', 'administrator', 'users', 'super administrator' );
        $this->addACL( 'login', 'administrator', 'users', 'manager' );
 
        $this->addACL( 'login', 'site', 'users', 'administrator' );
        $this->addACL( 'login', 'site', 'users', 'super administrator' );
        $this->addACL( 'login', 'site', 'users', 'manager' );
 
        $this->addACL( 'login', 'site', 'users', 'registered' );
        $this->addACL( 'login', 'site', 'users', 'author' );
        $this->addACL( 'login', 'site', 'users', 'editor' );
        $this->addACL( 'login', 'site', 'users', 'publisher' );
        // backend menus
 
        $this->addACL( 'com_banners', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_banners', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_banners', 'manage', 'users', 'manager' );
 
        $this->addACL( 'com_checkin', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_checkin', 'manage', 'users', 'administrator' );
 
        $this->addACL( 'com_cache', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_cache', 'manage', 'users', 'administrator' );
 
        $this->addACL( 'com_config', 'manage', 'users', 'super administrator' );
        //$this->addACL( 'com_config', 'manage', 'users', 'administrator' );
 
        $this->addACL( 'com_contact', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_contact', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_contact', 'manage', 'users', 'manager' );
 
        $this->addACL( 'com_components', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_components', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_components', 'manage', 'users', 'manager' );
 
        $this->addACL( 'com_frontpage', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_frontpage', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_frontpage', 'manage', 'users', 'manager' );
        $this->addACL( 'com_frontpage', 'edit', 'users', 'manager' );
 
        // access to installers and base installer
        $this->addACL( 'com_installer', 'installer', 'users', 'administrator' );
        $this->addACL( 'com_installer', 'installer', 'users', 'super administrator' );
 
        $this->addACL( 'com_installer', 'component', 'users', 'administrator' );
        $this->addACL( 'com_installer', 'component', 'users', 'super administrator' );
 
        $this->addACL( 'com_installer', 'language', 'users', 'super administrator' );
        $this->addACL( 'com_installer', 'language', 'users', 'administrator' );
 
        $this->addACL( 'com_installer', 'module', 'users', 'administrator' );
        $this->addACL( 'com_installer', 'module', 'users', 'super administrator' );
 
        $this->addACL( 'com_installer', 'plugin', 'users', 'administrator' );
        $this->addACL( 'com_installer', 'plugin', 'users', 'super administrator' );
 
        $this->addACL( 'com_installer', 'template', 'users', 'super administrator' );
        $this->addACL( 'com_installer', 'template', 'users', 'administrator' );
 
        $this->addACL( 'com_languages', 'manage', 'users', 'super administrator' );
 
        $this->addACL( 'com_plugins', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_plugins', 'manage', 'users', 'administrator' );
        // uncomment following to allow managers to edit modules
        //array( 'administration', 'edit', 'users', 'manager', 'modules', 'all' );
 
        $this->addACL( 'com_massmail', 'manage', 'users', 'super administrator' );
 
        $this->addACL( 'com_media', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_media', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_media', 'manage', 'users', 'manager' );
        $this->addACL( 'com_media', 'popup', 'users', 'super administrator' );
        $this->addACL( 'com_media', 'popup', 'users', 'administrator' );
        $this->addACL( 'com_media', 'popup', 'users', 'manager' );
        $this->addACL( 'com_media', 'popup', 'users', 'registered' );
        $this->addACL( 'com_media', 'popup', 'users', 'author' );
        $this->addACL( 'com_media', 'popup', 'users', 'editor' );
        $this->addACL( 'com_media', 'popup', 'users', 'publisher' );
        $this->addACL( 'com_media', 'upload', 'users', 'super administrator' );
        $this->addACL( 'com_media', 'upload', 'users', 'administrator' );
        $this->addACL( 'com_media', 'upload', 'users', 'manager' );
 
        $this->addACL( 'com_menus', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_menus', 'manage', 'users', 'super administrator' );
 
        $this->addACL( 'com_modules', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_modules', 'manage', 'users', 'administrator' );
 
        $this->addACL( 'com_newsfeeds', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_newsfeeds', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_newsfeeds', 'manage', 'users', 'manager' );
 
        $this->addACL( 'com_poll', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_poll', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_poll', 'manage', 'users', 'manager' );
 
        $this->addACL( 'com_templates', 'manage', 'users', 'super administrator' );
        //$this->addACL( 'com_templates', 'manage', 'user', 'administrator' )
 
        $this->addACL( 'com_trash', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_trash', 'manage', 'users', 'super administrator' );
 
        // email block users property
        $this->addACL( 'com_users', 'block user', 'users', 'administrator' );
        $this->addACL( 'com_users', 'block user', 'users', 'super administrator' );
 
        $this->addACL( 'com_users', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_users', 'manage', 'users', 'super administrator' );
 
        $this->addACL( 'com_weblinks', 'manage', 'users', 'super administrator' );
        $this->addACL( 'com_weblinks', 'manage', 'users', 'administrator' );
        $this->addACL( 'com_weblinks', 'manage', 'users', 'manager' );
 
        // email system events
        $this->addACL( 'com_users', 'email_events', 'users', 'administrator' );
        $this->addACL( 'com_users', 'email_events', 'users', 'super administrator' );
        $this->addACL( 'workflow', 'email_events', 'users', 'administrator', null, null );
        $this->addACL( 'workflow', 'email_events', 'users', 'super administrator', null, null );
 
        // actions
        $this->addACL( 'com_content', 'add', 'users', 'author', 'content', 'all' );
        $this->addACL( 'com_content', 'add', 'users', 'editor', 'content', 'all' );
        $this->addACL( 'com_content', 'add', 'users', 'publisher', 'content', 'all' );
        $this->addACL( 'com_content', 'edit', 'users', 'author', 'content', 'own' );
        $this->addACL( 'com_content', 'edit', 'users', 'editor', 'content', 'all' );
        $this->addACL( 'com_content', 'edit', 'users', 'publisher', 'content', 'all' );
        $this->addACL( 'com_content', 'publish', 'users', 'publisher', 'content', 'all' );
 
        $this->addACL( 'com_content', 'add', 'users', 'manager', 'content', 'all' );
        $this->addACL( 'com_content', 'edit', 'users', 'manager', 'content', 'all' );
        $this->addACL( 'com_content', 'publish', 'users', 'manager', 'content', 'all' );
 
        $this->addACL( 'com_content', 'add', 'users', 'administrator', 'content', 'all' );
        $this->addACL( 'com_content', 'edit', 'users', 'administrator', 'content', 'all' );
        $this->addACL( 'com_content', 'publish', 'users', 'administrator', 'content', 'all' );
 
        $this->addACL( 'com_content', 'add', 'users', 'super administrator', 'content', 'all' );
        $this->addACL( 'com_content', 'edit', 'users', 'super administrator', 'content', 'all' );
        $this->addACL( 'com_content', 'publish', 'users', 'super administrator', 'content', 'all' );
}

[<! removed edit link to red link >] <! removed transcluded page call, red link never existed >

Examples

<CodeExamplesForm />