User in multiple groups

Hi guys,

i'm using zenphoto for more than 3 years now, great work, exactly what i was looking for (using ext-sources & groups).

I have a question regarding groups:
Is it possible to assign two or more groups to one user?
--> user sister in group friends AND group family.

I tried several ways to achieve this, but no luck.

If it is not possible, is it planned to implement this feature in future releases? - this would be great!

Thanks in advance,
Luke

Comments

  • I do not think that assigning more than one group to a user makes any sense. A group defines a set of attributes for the user. There can be only one set of attributes per user.

    You have not really said what you wish to accomplish, but I will presume you want to do something like have a set of "manged" albums for "family" and a different set for "friends" and you would like your sister to have the union of those sets.

    The simplest solution would be for you to use "templates" initially when you create a user then make specific changes to the user as approrpiate to extend his managed ablums.
  • I have looked into this idea. What can be made to work is to make user templates "additive". That is if you apply a template to a user it will merge the template rights with the user's current rights and it will merge any managed objects.

    I think this will do what you wish. You may try it out with the development build on GitHub https://github.com/zenphoto/zenphoto
  • Hi,
    i tried to test the template merge festure via git clone, but somehow i can't create groups or templates, change managed albums or apply existing templates, so i switched back to the stable release version.

    The problem that i see regarding the template merge is that changes that i will make in the template will not be applied to the user.
    short example:

    user: sister
    group: friends
    template: family

    When i add a album to the family template after i merged it with the user, the new album will not be available for the user, or is there a missunderstanding?
  • Templates are one-time use items. So, yes, later changes do not get applied unless you manually do so after the change.

    What is happening when you try to do those changes with the development release? All is working when I do them.
  • Ok, so the only possible way to realise my scenario is to apply the template to the user after every change. (?)

    I tried it out in a new, clean vm - when i add a group, the green banner is displayed with "saved", but no group has been added --> debug.log:
    {7383:Mon, 19 Nov 2012 11:43:17 GMT}

    NOTICE: Undefined index: totalgroups in /var/www/zenphoto/zp-core/zp-extensions/user_groups/user_groups-tab.php on line 46
  • Well, if you can try the development build again, I have implemented multi-group memberships.

    But the error you report is an indication that there is too much data being posted on the group tab when you hit apply. This would be a server or browser limitation. I am not sure why the data being posted would be differen in the development release, but perhaps the current update changes will be different.

    If not, you will have to figure out how to either reduce the number of groups on the tab or increase the amount of data that can be posted.
  • Regards the truncated POST data--There is an option for the number of users shown on a page. Bottom of the general tab. That setting is applied to the groups as well. Reduce the number shown untl the POST data is intact.
  • Awesome - the multiple group option!

    Problem was logged in apaches error.log:
    PHP Warning: Unknown: Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: https://192.168.1.14/zenphoto/zp-core/zp-extensions/user_groups/user_groups-tab.php?page=users&tab=groups

    increasing max_input_vars to 20000 solved it (i think this has been caused by so many albums on external mountpoint)

    the only problem that prevents me from testing multiple group-users is that i cannot logout (i cloned it again, and this happens also in the plain new installation after setup & no other change)
  • Try cleaing tour browser cookies. IE especially does not handle "folder" based cookies well, so may ce getting the logob cookie from the other install.
  • great, thanks for this hint.
    the multiple group user work as expected now.
    BIG thanks for implementing this feature, it helps a lot!
  • Thanks for mentioning this feature. Not something we had considered.

    I did find a bug in the logout handling that is now fixed.

    Remember that the Dev release is still under development (beta release will happen early December.) That means there is a bunch of debug code enabled.

    Let us know of any problems you have, and chech GitHub for updates.
Sign In or Register to comment.