Hello,
I often create photo galleries for groups of people who want to share pictures within their group, i.e. not accessible to anyone else. I usually create a gallery for them and create folders for all the members of the groups who want to add pictures. The other members get a generic user/pwd.
In order to avoid questions and security issues, I want to restrict the access to the edition of folder permissions to the admin user only. I could do it in the top menu by adding a test in gallery_event.php that can be found in modules\gallery\helpers\ (got that trick somewhere on the web).
code snippet:
if ($item->is_album()) {
if ($can_edit) {
if (identity::active_user()->admin) { /* prevents non-admin to change folder privileges. */
$options_menu->append(Menu::factory("dialog")
->id("edit_permissions")
->label(t("Edit permissions"))
->url(url::site("permissions/browse/$item->id"))); }
}
However, I could not find how to change this in the pop-up menu of the folder's Thumbnail view (any advice here would be welcome).
In any case, this means changing the code for each install, which is not very practical. Also, I believe that I am not the only one with this issue. Could we improve this with a parameter in the "Advanced Settings" that would restrict the change of permissions to admin users only?
I realize that this is not a critical issue, but if it is easy to implement, it would certainly make life easier for some people (including me).
Thanks a lot for this great product.
Eric
Posts: 25968
Here is a module to test as I did not do extensive testing.
It removes the two 'edit permissions' links except if you are the admin.
I'm sure somebody can come up with a better name so that it reflects what it does.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
Hello Floridave,
I just tried the module and it works exactly the way I need it.
Thanks a lot. I will put it on my two galleries and let you know if there is any problem. Thanks again.
Eric
Posts: 11
Eric.
Please i just uploaded this gallery for the first time...i am having a problem i believe u can solve....i actually want users to be able to upload photos when they log in....becos i cannot find the upload menu when i log in through user account...please help
emma
Posts: 25968
Is your question related to this thread or this module?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
my question is related to this treat...please dave...when i first installed the admin permission module it worked perfectly well...but recently i discover that when i click the album permission menu...it opens but does not display options...it just display the album name and there are no options under..
please help.
Posts: 25968
Don't know from your explanation. Uninstall the module?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 11
I HAVE UNINSTALLED THE MODULE AND REINSTALL....BUT STILL NOT SHOWING THE OPTIONS
Posts: 25968
Sorry to hear that it does not work for you.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 25968
Posts: 11
anyway...thank you so much...
please do you know any module that i can use to diplay some little images at the bottom of my site? just to display any image i want randomly..??
Posts: 1
Hi,
I just wanna share something: users can access to the permissions throw link (index.php/permissions/browse/<id>), that mean everybody who have edit rights can see who can access to the album...
So i added two lines in 2files in module/gallery/views folder: permissions_browse.html.php and permissions_form.html.php.
That's probably not the best solution, but it's one...
Posts: 25968
Because of incompatibility with another module this module is now replaced with:
http://codex.gallery2.org/Gallery3:Modules:remove_actions
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team