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

is silverstripe the correct cms?


Reply

6 Posts   932 Views

Avatar
dreamstudio

4 March 2009 at 8:54am (Last edited: 4 March 2009 9:07am), Community Member, 48 Posts

We are trying to narrow down the cms for a client who has specific requirements which are below

They need people to login to the admin area with different user roles.. we see you can do this in silverstripe and then set what permissions they have, one thing my client wants is the ability for just the overall administrator to publish the content, everyone else... or everyone within a different group only to be able to save... is this possible to switch off the publish button for everyone except certain groups?

is it also possible for people within a group to only see certain parts of the admin.... I know we can turnoff comments, reports etc access.. but what about in editing pages... can we turn off translations, access... reports.. metadata for certain groups so they literally just can edit the page and click save

Avatar
Willr

4 March 2009 at 1:39pm Forum Moderator, 5511 Posts

I dont know if you can hide tabs as such as I haven't used the permissions system in the backend alot but you do have access to a couple functions like canView(), canPublish(), canEdit() that you can use for permissions such as hiding publishing actions etc.

You might find the cms workflow module quite handy for this http://doc.silverstripe.com/doku.php?id=modules:cmsworkflow

Avatar
Sam

4 March 2009 at 4:53pm Administrator, 685 Posts

Hi dreamstudio,

We're releasing a cmsworkflow module in the near future that will give you the features that you need.

Thanks,
Sam

Avatar
Carbon Crayon

5 March 2009 at 12:12am (Last edited: 5 March 2009 12:15am), Community Member, 598 Posts

Hi Dream studio

You can achiev those things already by adding some simple code to your page.php model class.

To remove tabs from users that are not admins I do this:

function getCMSFields(){
.
.
.
if(!Member::currentUser()->isAdmin()){

$fields->removeByName("Access"):
}
.
.
.
}

You could easily extend this to chech for groups by doing Member::currentUser->inGroup($GroupID) or if you needed to be able to assign groups permission rights from with the CMS you could create a new permission role (see the forum module) and use Permission::check('YourRoleName')

To remove publish rights you can use the canPublish() function in your page model like so:

function canPublish(){
if(Member::currentUser()->isAdmin()){
return true;
}else{
return false;
}

Again this can be extended to take groups into account.

Hope that helps :)

Avatar
Sam

5 March 2009 at 9:19am Administrator, 685 Posts

One small suggestion - you should use Permission::check("ADMIN") instead of $member->isAdmin() :-).

Avatar
Carbon Crayon

5 March 2009 at 10:09am Community Member, 598 Posts

Hey sam, thanks for the tip :) Just out of interest how does the permission check differ from the member functions?

Is there an equivilent for checking groups or is the ->inGroup() still the best way to do that?