SproutCMS

This is the code documentation for the SproutCMS project

function checkAccess()

Check access for a given controller/access flag combo
If this returns false, it will echo out an error message; the calling code should just return.

Usage

True $AdminController->checkAccess ( ManagedAdminController $ctlr , string $access_flag , bool $action );

Arguments

  1. ManagedAdminController $ctlr
    A controller to check
  2. string $access_flag
    The access flag to check, e.g. 'add', 'edit', etc
  3. bool $action
    True if it's an action method, false if it's a form method.

Return value

  • True
    if auth is okay, false if it is not.