21493 Posts in 5784 Topics by 2622 members
General Questions
SilverStripe Forums » General Questions » Allowing Content Authors to edit dataobject in Gridfield
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, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 266 Views |
-
Allowing Content Authors to edit dataobject in Gridfield

15 August 2012 at 5:33am Last edited: 5 December 2012 10:37am
Hi,
I am having a bit of trouble working out how to allow Content Authors to create, edit, publish and delete records through the Gridfield.
In Silverstripe 2.4 I just used to add the following code to the dataobject that was being managed through a complex table field for example but this doesn't seem to work for the Gridfield in 3.0:
function canEdit() { return true; }
function canDelete() { return true; }
function canCreate() { return true; }
function canPublish() { return true; }I am sure I am missing something simple so would be grateful if anyone could point me in the right direction.
Cheers,
Jim
[bold]Edit[/bold]
I was right I just missed out something really obvious. Just needed to add canView. This is what I ended up using for information:
function canEdit($member = null)
{
return true;
}
function canDelete($member = null)
{
return true;
}
function canCreate($member = null)
{
return true;
}
function canPublish($member = null)
{
return true;
}
function canView($member = null)
{
return true;
}
| 266 Views | ||
|
Page:
1
|
Go to Top |
