Jump to:

5541 Posts in 1738 Topics by 1224 members

Customising the CMS

SilverStripe Forums » Customising the CMS » SS3 permissions problem

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

Page: 1
Go to End
Author Topic: 391 Views
  • voodoochile
    Avatar
    Community Member
    52 Posts

    SS3 permissions problem Link to this post

    Hi all

    I have some custom data objects using model admin, I have setup a new user that i only want to see certian parts of the model admin of which one of these is my dataobject.

    When i login as this user the menu shows the appropiate buttons including my data object when i enter that particular object there is no data showing.

    I have enterd a couple of entries logged in as admin, am i missing something here? i would like this user to be able to view data entered by other users without having to worry about all the other modeladmin functions i.e assets, Security, pages as they only need to see the dataobject in question and the reports button.

  • martimiz
    Avatar
    Forum Moderator
    1086 Posts

    Re: SS3 permissions problem Link to this post

    You can use the canCreate() function for a DataObject to determine if an add button is displayed. Same way for the delete button (canDelete) and the edit link (canEdit) in ModelAdmin. Use these methods to check on the current member. Basically he only needs canView() to return true...

    Martine

  • voodoochile
    Avatar
    Community Member
    52 Posts

    Re: SS3 permissions problem Link to this post

    Thanks for your reply martimiz

    this gave me enough clues to point me in the direction i needed, my end result dosnt look great, but it has achieved what i needed it to for now.

    i will clean it up a little later.

    391 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.