JRules/getAllowed

From Joomla! Documentation

Jump to: navigation, search

Contents

Description

Get the allowed actions for an identity.

Syntax

JRules::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;
        }
Personal tools