Jump to:

17452 Posts in 4473 Topics by 1971 members


SilverStripe Forums » Archive » canDelete

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1009 Views
  • toddm
    Community Member
    15 Posts

    canDelete Link to this post


    I'm working on customizing permissions and have the following update to Page.php:

    class Page extends SiteTree {
       static $db = array(
       static $has_one = array(

    protected $publisherGroups = array(
        "Administrators" //,
        // "Editors"
       function canPublish() {
        $member = Member::currentUser();
        return $member->inGroups($this->publisherGroups);
       function canDelete() {
        $member = Member::currentUser();
        return $member->inGroups($this->publisherGroups);

    So, I can't Delete from Batch Actions, but users in the Editors group can still Delete from the "Delete from Draft Site" and subsequent "Delete from Published Site" buttons in the lower right?

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.