\Restrictable
An extension that adds role granting functionality
- Author: marcus@silverstripe.com.au
- License: BSD License http://silverstripe.org/bsd-license/
Synopsis
class Restrictable
extends DataExtension
{
- // members
- protected static boolean $enabled = true;
- private static array $db = ;
- private static array $has_one = ;
- private static array $defaults = ;
- // methods
- public static void get_enabled()
- public static void set_enabled()
- public void getAuthorities()
- public void grant()
- public deny()
- public type checkPerm()
- public void fieldPermissions()
- public type canView()
- public void canEdit()
- public void canDelete()
- public void canPublish()
- public void updateCMSFields()
- public void updateSettingsFields()
- public void updateFrontEndFields()
- public void canAddChildren()
- public void onBeforeWrite()
Hierarchy
Extends
- DataExtension
Members
private
- $db
- $defaults
- $has_one
protected
- $enabled — boolean
Methods
public
- canAddChildren() — handles SiteTree::canAddChildren, useful for other types too
- canDelete()
- canEdit()
- canPublish()
- canView() — Check for a View permission only if the item exists in the DB
- checkPerm() — Return true or false as to whether a given user can access an object
- deny() — Deny access to a data object to a particular group/user
- fieldPermissions() — Allow users to specify an array of field level permission requirements on a content object that will be checked when editing items.
- getAuthorities()
- get_enabled()
- grant() — Grants a specific permission to a given user or group
- onBeforeWrite()
- set_enabled()
- updateCMSFields()
- updateFrontEndFields() — Set default for inherit
- updateSettingsFields()