- Status: Moved to Github
Hello,
The new feature "Permissions::checkPermission()" will not always work for "edit" permission - for example, where the default action would not allow the user to edit an item it is not always possible to override this to allow the edit because couldEdit() might already have blocked the edit attempt before the extension gets the opportunity to override the default behaviour. As a specific example, if you try to edit an item owned by a different author then couldEdit will block the attempt before canEdit gets a chance to override.
One presumes that in this case 'delete' would work - that is, it would be possible to override so that the user can delete items owned by a different author.
That said - it would also be really useful if you would tell me how Permissions::checkPermission() is supposed to work (I mean, how I should code my Permissions extension). I created a simple Permissions extension with checkPermission - if I leave the class empty then it does nothing and I can view items (e.g. a calendar event). But if I copy the contents of PermissionAbstract (functions getNodeClasses and checkPermission) into my class then when I attempt to view anything (a calendar event for example) I just get a blank screen...
Thanks.
John
Recommended Comments