Security module interface
Warning: this page is not completed yet. Only some guidelines are presented here. Full documentation is underway.
Warning: ./system/lib/ctlSecurityService.class.php class supplied with CTL distribution has no isAllowed() method implementation yet. Be careful with it.
Description
The purpose of this module is to provide an interface to various security mechanisms that may be implemented in different websites.
Note that this interface only provides only low-level security functions (to check if user is logged in, has permissions to complete a task, and so on). Page functions (e.g. login page, logout script, display of username on page) should be implemented in your own modules.
Configuration
These are $config values reserved for this interface:
- $config['Security']['objects']['Security'] - a loadable object name for the interface that is described below.
- $config['Security']['objects']['userManager'] - a loadable object name. Note that no interface definition or implementation exists yet. Please do not use yet.
- $config['Security']['objects']['groupManager'] - a loadable object name. Note that no interface definition or implementation exists yet. Please do not use yet.
- $config['Security']['objects']['infoManager'] - a loadable object name. Note that no interface definition or implementation exists yet. Please do not use yet.
- $config['Security']['objects']['permissionManager'] - a loadable object name. Note that no interface definition or implementation exists yet. Please do not use yet.
Interface
Standard methods for Security.Security object:
- login($login, $password) - login user.
- logout() - logout current user.
- isLoggedIn($level = NULL) - check if current user is logged in (level is not mandatory and depends on your implementation).
- isRoot() - check if current user is root
- getUserId() - get current user ID (username or login)
- getUserInfo($user_id = NULL) - get current or specified user information array.
- isAllowed($permission) - check if current user has required permission to access some functionality.
$Revision: 1.1 $, $Date: 2005/11/22 07:09:49 $
