|
The Pedigree Project 0.1
|
#include <UserManager.h>
Collaboration diagram for UserManager:Public Member Functions | |
| void | initialise () |
| User * | getUser (size_t id) |
| User * | getUser (String name) |
| Group * | getGroup (size_t id) |
| Group * | getGroup (String name) |
Static Public Member Functions | |
| static UserManager & | instance () |
Private Member Functions | |
| UserManager () | |
| UserManager (const UserManager &) | |
| UserManager & | operator= (const UserManager &) |
| bool | initialiseUsers () |
| bool | initialiseGroups () |
| bool | initialiseMemberships () |
| void | addUser (size_t uid, String username, String fullName, size_t group, String home, String shell) |
| void | addGroup (size_t gid, String name) |
Private Attributes | |
| Tree< size_t, User * > | m_Users |
| Tree< size_t, Group * > | m_Groups |
Static Private Attributes | |
| static UserManager | m_Instance |
The user manager provides lookups of users and groups.
Definition at line 29 of file UserManager.h.
|
private |
Singleton class - default constructor hidden.
Definition at line 37 of file UserManager.cc.
|
private |
Definition at line 39 of file UserManager.cc.
|
private |
Definition at line 201 of file UserManager.cc.
|
private |
Definition at line 179 of file UserManager.cc.
| Group * UserManager::getGroup | ( | size_t | id | ) |
Look up a group by ID.
Definition at line 166 of file UserManager.cc.
References Tree< K, E >::lookup(), and m_Groups.
Look up a group by name.
Definition at line 170 of file UserManager.cc.
References Tree< K, E >::begin(), Tree< K, E >::end(), Group::getName(), and m_Groups.
| User * UserManager::getUser | ( | size_t | id | ) |
Look up a user by ID.
Definition at line 153 of file UserManager.cc.
References Tree< K, E >::lookup(), and m_Users.
Referenced by initialise().
Here is the caller graph for this function:Look up a user by name.
Definition at line 157 of file UserManager.cc.
References Tree< K, E >::begin(), Tree< K, E >::end(), User::getUsername(), and m_Users.
| void UserManager::initialise | ( | ) |
Loads the initial users and groups.
Definition at line 213 of file UserManager.cc.
References User::getDefaultGroup(), Process::getParent(), getUser(), and ProcessorBase::information().
|
private |
Definition at line 69 of file UserManager.cc.
|
private |
Definition at line 120 of file UserManager.cc.
|
private |
Definition at line 94 of file UserManager.cc.
|
inlinestatic |
Get the singleton instance.
Definition at line 32 of file UserManager.h.
Dictionary of groups, indexed by ID.
Definition at line 66 of file UserManager.h.
Referenced by getGroup(), and getGroup().
|
staticprivate |
Definition at line 68 of file UserManager.h.
Dictionary of users, indexed by ID.
Definition at line 64 of file UserManager.h.