forum.coppermine-gallery.net

No Support => Feature requests => Topic started by: wilk on February 08, 2012, 11:06:47 am

Title: Secondary groups in User Manager
Post by: wilk on February 08, 2012, 11:06:47 am
Currently User Manager shows only primary group membership, so we have one admin and the rest are registered. To check full membership we have to check every user's profile editor or look into database. It would be convenient to let it also show secondary membership, so management will be easier. Of course we could set main group to our custom group, but there arises problem because of the way ACLs are working in Coppermine - such user stops being in default registered group and we have to add it as secondary (then there is a next glitch - we can't remove "registered" from secondary membership without editing database…).
Title: Re: Secondary groups in User Manager
Post by: wilk on March 15, 2012, 03:35:34 pm
Added in: http://forum.coppermine-gallery.net/index.php/topic,74392.msg359138.html#msg359138
Title: Re: Secondary groups in User Manager
Post by: Αndré on March 16, 2012, 10:10:39 am
Unfortunately that patch works only in unbridged galleries. If it should work in every Coppermine gallery, you'd have to use some code like this (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/usermgr.php?r1=8338&r2=8337&pathrev=8338) to get the group membership. Maybe I'll create a new core function to get the groups, so it could be easily used at different places (e.g. in plugins).
Title: Re: Secondary groups in User Manager
Post by: Αndré on March 16, 2012, 11:59:35 am
Added function 'cpg_get_groups' in SVN revision 8340. Will check if we can add this feature as plugin in cpg1.5.x later.
Title: Re: Secondary groups in User Manager
Post by: Αndré on March 20, 2012, 04:56:15 pm
I just committed a new plugin 'secondary_user_groups' to our SVN repository. It's designed to work with cpg1.5.20 and later, but if you want to test it immediately, please follow these steps:

1. Add the function cpg_get_groups to your include/functions.inc.php file (you can find it here (http://coppermine.svn.sourceforge.net/viewvc/coppermine/trunk/cpg1.5.x/include/functions.inc.php?r1=8340&r2=8339&pathrev=8340)).

2. Download (http://coppermine.svn.sourceforge.net/viewvc/coppermine/branches/cpg1.5.x/plugins/secondary_user_groups/?view=tar) the plugin from SVN repository.

3. Open the plugin's configuration.php file, find
Code: [Select]
$plugin_cpg_version = array('min' => '1.5.20');and replace with
Code: [Select]
$plugin_cpg_version = array('min' => '1.5');
4. Create a new folder 'secondary_user_groups' in your gallery's plugins folder, upload the plugin files to that directory and install it via Coppermine's plugin manager.


Now you should see any secondary user groups in the user manager. The primary group will just be underlined if there are secondary groups. Please report if the plugin works as expected.