SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class PerRecordPerms

Helper for implementing per-record permissions

Functions

NameVisibilityDescription
controllerRestrictedpublic (static)Checks to see if per-record permissions apply to a particular controller
fetchDetailspublic (static)Gets the permission details from the database
getCategoryClausepublic (static)Gets a clause to restrict a query to the set of categories the current admin belongs to
hasRecordPermspublic (static)Checks if a given controller has at least one permission rule in place
savepublic (static)Save the permissions for a particular record

public controllerRestricted

bool PerRecordPerms::controllerRestricted ( ManagedAdminController $ctlr );

Checks to see if per-record permissions apply to a particular controller

public fetchDetails

array PerRecordPerms::fetchDetails ( ManagedAdminController $ctlr , int $item_id );

Gets the permission details from the database

public getCategoryClause

string PerRecordPerms::getCategoryClause ( );

Gets a clause to restrict a query to the set of categories the current admin belongs to

public hasRecordPerms

bool PerRecordPerms::hasRecordPerms ( ManagedAdminController $ctlr );

Checks if a given controller has at least one permission rule in place

public save

void PerRecordPerms::save ( ManagedAdminController $ctlr , int $item_id );

Save the permissions for a particular record