Secondary groups in User Manager Secondary groups in User Manager
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Secondary groups in User Manager

Started by wilk, February 08, 2012, 11:06:47 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

wilk

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...).
PM me for Polish translations (new/update)

wilk

PM me for Polish translations (new/update)

Αndré

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 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).

Αndré

Added function 'cpg_get_groups' in SVN revision 8340. Will check if we can add this feature as plugin in cpg1.5.x later.

Αndré

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).

2. Download the plugin from SVN repository.

3. Open the plugin's configuration.php file, find
$plugin_cpg_version = array('min' => '1.5.20');
and replace with
$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.