Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Secondary groups in User Manager  (Read 4816 times)

0 Members and 1 Guest are viewing this topic.

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Secondary groups in User Manager
« 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…).
Logged
PM me for Polish translations (new/update)

wilk

  • Translator
  • Coppermine regular visitor
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 51
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Logged
PM me for Polish translations (new/update)

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Secondary groups in User Manager
« Reply #2 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 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).
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Secondary groups in User Manager
« Reply #3 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15765
Re: Secondary groups in User Manager
« Reply #4 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).

2. Download 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.
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.