Table of Contents

authorize

API Package Subpackage Class Method Reference Last reviewed Doc status
API Home Package Joomla.Framework Subpackage Application Class JController Method authorize Reference authorize() Never Work in Progress

Checks whether the current user is authorized to execute the specified task.

This check is dependent on the access control key being specified using the JController->setAccessControl method. If the current user (obtained using JFactory::getUser() method) has the required permission to execute the specified task, true is returned. If the user does not have permission to execute the specified task, false is returned. If no access control is setup, true is returned.

If an access control section value has already been specified (using the JController->setAccessControl method), then it is used instead of the value of the $task parameter.

For information on how user permissions are determined, please refer to the JUser->authorize method.

Syntax

boolean authorize ( $task )

$task string is a string containing the ACO Section Value to check access on.

See Also

Introduction to ACL.

Examples

Example

might produce

Result