modmore / VersionX

Resource & Element Versioning Extra for MODX Revolution (supports 2.2 and up). Extends the core in a future-proof manner to keep copies of every change to resources, templates, template variables, chunks, snippets and plugins.
https://modmore.com/extras/versionx/
40 stars 20 forks source link

VersionX CMP, tabs permissions #68

Open minagerges opened 10 years ago

minagerges commented 10 years ago

Check if user has permissions to view specific element before loading its tab in CMP. I've made some modification and have this option for one of my installation.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/3389758-versionx-cmp-tabs-permissions?utm_campaign=plugin&utm_content=tracker%2F805489&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F805489&utm_medium=issues&utm_source=github).
Mark-H commented 10 years ago

If you've done this before, mind sharing the code? ;) Op 29 jul. 2014 22:27 schreef "minagerges" notifications@github.com:

Check if user has permissions to view specific element before loading its tab in CMP. I've made some modification and have this option for one of my installation.

— Reply to this email directly or view it on GitHub https://github.com/Mark-H/VersionX2/issues/68.

minagerges commented 10 years ago

Sure. I will have access to that environment next week [On vacation on the country side at the moment ;) ] What i did was modifying index.php and rebuilt action.index.js from there; according to user permissions i output the item (tab).

Also what I did was modifying the context action to work according to user permissions as well.

eg. user right click a version and choose revert, but he has no edit permission on that resource/element then he gets an access denied error. i modified "function revert(array $options = array()" to check edit permission.

Do you want me to trigger another issue for that as well? Can do, but again sharing the code is next week (it's 1 line anyway :) )

And i added delete version functionality in another environment. VersionX is my favourite extra, just it needs more time from you. Before i use it i was using a very basic custom plugin i made which is nothing compared to your great work.

minagerges commented 10 years ago

Forked.

exside commented 8 years ago

+1

muzzwood commented 2 weeks ago

Permissions would still be a good idea in the latest version for the CMP and object types.