21301 Posts in 5735 Topics by 2603 members
General Questions
SilverStripe Forums » General Questions » SOLVED if canEdit return false - also prevent from creating children?
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 202 Views |
-
SOLVED if canEdit return false - also prevent from creating children?

29 July 2012 at 8:45am
I have a pagetype (NewsCategory extends Page) with this canEdit function:
function canEdit($Member = null){
if(permission::check('PAGETYPE_NEWSCATEGORY_EDIT')){
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 ...?
-
Re: SOLVED if canEdit return false - also prevent from creating children?

29 July 2012 at 11:39am
function canAddChildren($member = null) {}
| 202 Views | ||
|
Page:
1
|
Go to Top |

