CAuthManager

NameauthManager
ClassCAuthManager
Location/home/vhosts/app-manager.eu5.org/framework/web/auth/CAuthManager.php
CAuthManager is the base class for authorization manager classes.

CAuthManager extends {@link CApplicationComponent} and implements some methods that are common among authorization manager classes. CAuthManager together with its concrete child classes implement the Role-Based Access Control (RBAC). The main idea is that permissions are organized as a hierarchy of {@link CAuthItem authorization items}. Items on higer level inherit the permissions represented by items on lower level. And roles are simply top-level authorization items that may be assigned to individual users. A user is said to have a permission to do something if the corresponding authorization item is inherited by one of his roles. Using authorization manager consists of two aspects. First, the authorization hierarchy and assignments have to be established. CAuthManager and its child classes provides APIs to accomplish this task. Developers may need to develop some GUI so that it is more intuitive to end-users. Second, developers call {@link IAuthManager::checkAccess} at appropriate places in the application code to check if the current user has the needed permission for an operation.

Options

Displaying 1-3 of 3 results.
NameValueDescriptionType
showErrorsfalseEnable error reporting for bizRules. @since 1.1.3boolean
defaultRolesarray()List of role names that are assigned to all users implicitly. These roles do not need to be explicitly assigned to any user. When calling {@link checkAccess}, these roles will be checked first. For performance reason, you should minimize the number of such roles. A typical usage of such roles is to define an 'authenticated' role and associate it with a biz rule which checks if the current user is authenticated. And then declare 'authenticated' in this property so that it can be applied to every authenticated user.array
behaviorsarray()The behaviors that should be attached to this component. The behaviors will be attached to the component when {@link init} is called. Please refer to {@link CModel::behaviors} on how to specify the value of this property.array
Free Web Hosting