Pluf_Precondition Class Reference

List of all members.

Static Public Member Functions

static loginRequired ($request)
static staffRequired ($request)
static adminRequired ($request)
static hasPerm ($request, $permission)
static sslRequired ($request)


Detailed Description

Ready to use preconditions to test if the user is logged in, etc.

Member Function Documentation

static Pluf_Precondition::loginRequired ( request  )  [static]

Check if the user is logged in.

Returns a redirection to the login page, but if not active returns a forbidden error.

Parameters:
Pluf_HTTP_Request 
Returns:
mixed

static Pluf_Precondition::staffRequired ( request  )  [static]

Check if the user is admin or staff.

Parameters:
Pluf_HTTP_Request 
Returns:
mixed

static Pluf_Precondition::adminRequired ( request  )  [static]

Check if the user is administrator..

Parameters:
Pluf_HTTP_Request 
Returns:
mixed

static Pluf_Precondition::hasPerm ( request,
permission 
) [static]

Check if the user has a given permission..

Parameters:
Pluf_HTTP_Request 
string Permission
Returns:
mixed

static Pluf_Precondition::sslRequired ( request  )  [static]

Requires SSL to access the view.

It will redirect the user to the same URL but over SSL if the user is not using SSL, if POST request, the data are lost, so handle it with care.

Parameters:
Pluf_HTTP_Request 
Returns:
mixed


The documentation for this class was generated from the following file:

Generated on Wed Feb 3 15:44:52 2010 for Pluf by  doxygen