Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

RoleManager Class Reference

Inheritance diagram for RoleManager:

Inheritance graph
[legend]
Collaboration diagram for RoleManager:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 RoleManager ($db)
 get_role_id ($pid, $name)
 get_role ($pId, $roleId)
 role_name_exists ($pid, $name)
 map_user_to_role ($pId, $user, $roleId)
 remove_mapping ($user, $roleId)
 list_mappings ($pId, $offset, $maxRecords, $sort_mode, $find)
 list_roles ($pId, $offset, $maxRecords, $sort_mode, $find, $where='')
 remove_role ($pId, $roleId)
 replace_role ($pId, $roleId, $vars)

Detailed Description

TODO Add a method to check if a role name exists in a process (to be used to prevent duplicate names)

Definition at line 17 of file RoleManager.php.


Constructor & Destructor Documentation

RoleManager::RoleManager (  $  db  ) 
 

Constructor takes a PEAR::Db object to be used to manipulate roles in the database.

Definition at line 23 of file RoleManager.php.


Member Function Documentation

RoleManager::get_role (  $  pId,
$  roleId
) 
 

Gets a role fields are returned as an asociative array

Definition at line 40 of file RoleManager.php.

RoleManager::list_mappings (  $  pId,
$  offset,
$  maxRecords,
$  sort_mode,
$  find
) 
 

List mappings

Definition at line 80 of file RoleManager.php.

RoleManager::list_roles (  $  pId,
$  offset,
$  maxRecords,
$  sort_mode,
$  find,
$  where = ''
) 
 

Lists roles at a per-process level

Definition at line 108 of file RoleManager.php.

RoleManager::map_user_to_role (  $  pId,
$  user,
$  roleId
) 
 

Maps a user to a role

Definition at line 60 of file RoleManager.php.

RoleManager::remove_mapping (  $  user,
$  roleId
) 
 

Removes a mapping

Definition at line 71 of file RoleManager.php.

RoleManager::remove_role (  $  pId,
$  roleId
) 
 

Removes a role.

Definition at line 142 of file RoleManager.php.

RoleManager::replace_role (  $  pId,
$  roleId,
$  vars
) 
 

Updates or inserts a new role in the database, $vars is an asociative array containing the fields to update or to insert as needed. $pId is the processId $roleId is the roleId

Definition at line 158 of file RoleManager.php.

RoleManager::role_name_exists (  $  pid,
$  name
) 
 

Indicates if a role exists

Definition at line 51 of file RoleManager.php.


The documentation for this class was generated from the following file:
Generated on Mon Jun 7 16:38:01 2004 for Galaxia by doxygen 1.3.4