API16

API16:JRules/getAllowed

From Joomla! Documentation

Description

Get the allowed actions for an identity.



Syntax

getAllowed($identity)
Parameter Name Default Value Description
$identity An integer representing the identity, or an array of identities

Defined in

libraries/joomla/access/rules.php

Importing

jimport( 'joomla.access.rules' );

Source Body

function getAllowed($identity)
{
        // Sweep for the allowed actions.
        $allowed = new JObject;
        foreach ($this->_data as $name => &$action)
        {
                if ($action->allow($identity)) {
                        $allowed->set($name, true);
                }
        }
        return $allowed;
}



Examples

Code Examples