Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

SOLVED if canEdit return false - also prevent from creating children?


2 Posts   496 Views


29 July 2012 at 8:45am Community Member, 175 Posts

I have a pagetype (NewsCategory extends Page) with this canEdit function:

function canEdit($Member = null){
         return true;
      } else {
         return false;

In my understanding this should prevent a user (not having the correct perms) to edit pages with this pagetype,
which is correct. But in my case it's also preventing users to create children under this pagetype. Why?

This pagetype should be a holder for NewsArticles. User should can create NewsArticles but should not be able
to edit NewsCategory ...



29 July 2012 at 11:39am Community Member, 175 Posts

function canAddChildren($member = null) {}