salted-herring/silverstripe-standard-permissions

Standard permissions module for SilverStripe CMS

2.0.0 2018-04-11 05:21 UTC

This package is not auto-updated.

Last update: 2024-12-19 18:02:47 UTC


README

Scrutinizer Code Quality Build Status

Implements Silverstripe's standard permissions (canCreate, canEdit, canDelete, and canView)

Install

The module can be installed via composer:

composer require salted-herring/silverstripe-standard-permissions

Usage

Any object that needs to use permissions, should do two things:

  1. Setup the yaml configuration to provide the permissions:
PublishProvider:
  classes:
    - Page
  1. The class you're using should also extend PublishProvider:
class Page {
  ...
  private static $extensions = [
    'PublishProvider'
  ];
  ...
}