-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX allow extensions to modify canXYZ methods #30
FIX allow extensions to modify canXYZ methods #30
Conversation
robbieaverill
commented
May 12, 2016
- Resolves BaseElement's canXYZ() methods can't be extended #29
This fix will call the extensions but it won't actually modify the response to it right? Think the pattern for this should be something like function canX(...) { .. $existing code |
@wilr yeah, it will call the parent method but won't use its results. It's |
@wilr no worries, let's go that way! |
10f6974
to
9323d3b
Compare
FYI I've gone with PSR-2 since it's coming - if you want me to use standard SS style I'm happy to change it |
Nah PSR1/2 FTW |
Cool. Hold this PR - I'm not sure it's working correctly with |
Looks like versioned-data-objects is returning Even with "Access to all CMS sections" enabled, |
@wilr - having had a quick read of the I'm confused about two things here:
|
Hey @wilr - what do you think about this change? |
* Resolves silverstripe#29 * Use extendedCan() instead of parent::canXYZ
3354d17
to
1098ad8
Compare
@wilr - rebased onto latest master changes |
Yeah I think that is possibly a better way to go and allows users to sub in anything else for permissions. |