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

user permissions


Reply


4 Posts   1671 Views

Avatar
arnott

Community Member, 16 Posts

15 October 2009 at 2:57am

hi all,
I am still new in using SS. When I try to create/edit 'Security groups' after clicking on security button in the CMS, I see 10 permissions, but in this page : http://doc.silverstripe.com/doku.php?id=permissions:codes\", I see more permissions. Do I need to make changes to get all all permissions ?

I want to create a group, whose members can read the sites and blogs, but only can post comments. Will "Can view any page on the site" code achieve that ?

Thanks,
arnott

Avatar
JoshuaLewis

Community Member, 76 Posts

16 October 2009 at 12:00am

I don't know about the extra permission codes in that list but these links should cover every thing you need to get the user restrictions you want.

http://ssbits.com/create-a-permission-code/
http://ssbits.com/custom-login-form-with-group-based-redirection/
http://doc.silverstripe.com/doku.php?id=security&s=secure

Avatar
arnott

Community Member, 16 Posts

17 October 2009 at 9:35am

Thanks a lot.

Avatar
arnott

Community Member, 16 Posts

21 October 2009 at 3:12am

Thanks again. It worked great.

I added the following code to : class Page_Controller extends ContentController implements PermissionProvider.

function providePermissions(){
return array(
"COMMENTER" => "Can view any page on the site",
);
}

And created a group with "COMMENTER" permissions. Now a user in the group can only post comments.