DAViCal
|
Public Member Functions | |
__construct ( $sid='') | |
AssignSessionDetails ( $u) | |
GetRoles () | |
HavePrivilegeTo ( $do_what, $path, $any=null) | |
RenderLoginPanel () | |
LoginRequired ( $roles='') | |
Public Attributes | |
$principal_id | |
Private Attributes | |
$privilege_resources = array() | |
Definition at line 48 of file DAViCalSession.php.
DAViCalSession::__construct | ( | $sid = '' | ) |
Create a new DAViCalSession object.
We create a Session and extend it with some additional useful DAViCal related information.
string | $sid | A session identifier. |
Definition at line 62 of file DAViCalSession.php.
DAViCalSession::AssignSessionDetails | ( | $u | ) |
Internal function used to assign the session details to a user's new session.
object | $u | The user+session object we (probably) read from the database. |
Definition at line 72 of file DAViCalSession.php.
DAViCalSession::GetRoles | ( | ) |
Method used to get the user's roles
Definition at line 92 of file DAViCalSession.php.
DAViCalSession::HavePrivilegeTo | ( | $do_what, | |
$path, | |||
$any = null |
|||
) |
Does the user have the privileges to do what is requested.
$do_what | mixed The request privilege name, or array of privilege names, to be checked. |
$path | string The path we want that permission for |
$any | boolean Whether we accept any of the privileges. The default is true, unless the requested privilege is 'all', when it is false. |
Definition at line 120 of file DAViCalSession.php.
DAViCalSession::LoginRequired | ( | $roles = '' | ) |
Checks that this user is logged in, and presents a login screen if they aren't.
The function can optionally confirm whether they are a member of one of a list of roles, and deny access if they are not a member of any of them.
string | $roles | The list of roles that the user must be a member of one of to be allowed to proceed. |
We allow basic auth to apply also, if present, though we check everything else first...
Definition at line 196 of file DAViCalSession.php.
DAViCalSession::RenderLoginPanel | ( | ) |
Renders some HTML for a basic login panel
Definition at line 138 of file DAViCalSession.php.
DAViCalSession::$principal_id |
Definition at line 51 of file DAViCalSession.php.
|
private |
Definition at line 52 of file DAViCalSession.php.