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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Data Model Questions /

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

How to use can permissions on DataExtension


Go to End


2 Posts   1684 Views

Avatar
Andrew Houle

Community Member, 140 Posts

19 December 2014 at 4:18am

I would like to override the can functions (canEdit, canView, canCreate, canDelete) as part of a DataExtension, but I'm having no success. At first I tried to just use the can functions like...

function canCreate($Member = null) { return true; }

But no dice.

After digging deeper it's my understanding that these functions can't be implemented on DataExtension, and that's what extendedCan() has been created for (https://groups.google.com/forum/#!msg/silverstripe-dev/0IpOy4B3ARs/86sjXwNN-WcJ), but I'm lost on how to use this and can't find a simple example. I did find this - http://www.sspaste.com/paste/show/51a5c7453e892 and some help here - http://www.sspaste.com/paste/show/51a5c7453e892 but I'm still stuck.

Anyone have experience getting this to work? Am I headed in the right direction?

Avatar
Andrew Houle

Community Member, 140 Posts

12 February 2015 at 6:09am

Bump... Any ideas on this?