17691 Posts in 4607 Topics by 2180 members
General Questions
SilverStripe Forums » General Questions » ModelAdmin 'Create' permissions
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
|
Page:
1
|
Go to End | |
| Author | Topic: | 1122 Views |
-
ModelAdmin 'Create' permissions

22 March 2010 at 7:48am Last edited: 22 March 2010 7:54am
I'm using a ModelAdmin subclass to manage a list of front-end users which are extended from Member. Everything is functioning just fine except that only members of the main administrator group can create and edit these new members and I want my Editor user group to have these privileges as well.
I've added the relevant permissions to the editor group through the Security.Permissions tab and even tried adding canCreate and canEdit to my Member and ModelAdmin sub-classes but nothing seems to work.
Does anyone know how I go about granting my Editor group the permissions needed to create and edit these Members through ModelAdmin?
I'm using SS v.2.3.7 with the 2.3 branch of DataObjectManager and SWFUploadField as well as the stable release of Multi-Step Form.
-
Re: ModelAdmin 'Create' permissions

31 March 2010 at 6:17am
Same problem here ... i'm investigating but nothing found yet.
-
Re: ModelAdmin 'Create' permissions

31 March 2010 at 10:32pm
Probably my problem isn't really the same.
My problem was with standard extended classes of DataObject used with ModelAdmin. With only access permission in the member group the user could only view ModelAdmin interface, but not add or edit items.
Next i try to add this code on my managed DataObject classesfunction canEdit()
{
return true;
}
function canDelete()
{
return true;
}
function canCreate()
{
return true;
}
function canPublish()
{
return true;
}and now users of groups other than Administrator can add and edit items (if i set access permissions in in security tab).
-
Re: ModelAdmin 'Create' permissions

1 April 2010 at 9:33am
Thanks mirkosassetti, that works on my setup as well. It looks like all four functions are needed and not just canCreate() and canEdit()
-
Re: ModelAdmin 'Create' permissions

29 January 2012 at 10:05pm
Thanks for posting that code, mirkosassetti. It solved my issue too.
| 1122 Views | ||
|
Page:
1
|
Go to Top |


