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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

Get permissions of current user: "Edit any page"


Go to End


2 Posts   1433 Views

Avatar
DeklinKelly

Community Member, 197 Posts

13 August 2010 at 2:09pm

Under "Permissions" in the CMS there is a checkbox: "Edit any page"

How can I access this in a Controller for the current user?

I see lots of information about the current user here but nothing about permissions:

$member = Member::currentUser(); 
print_r($member);

Avatar
DeklinKelly

Community Member, 197 Posts

13 August 2010 at 2:34pm

I found the answer. This does what I need:


  function AuthorizedAuthor () {
	return SiteTree::canEdit();
  }