Gallery Admin = vBulletin Admin does that has to be? Gallery Admin = vBulletin Admin does that has to be?
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Gallery Admin = vBulletin Admin does that has to be?

Started by Riccardo83, October 04, 2008, 03:48:30 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Riccardo83

My question is, I want to make someone admin of the gallery, but not of vBulletin, how do i do that?

Joachim Müller

If you don't trust that person enough to be a forum admin, then don't allow that person to administer coppermine. Simple as that: don't do that. If you insist and must see this done, then you'll have to edit the bridge file accordingly. Add the person to a special group and then make that group an admin group in coppermine (by editing the bridge file).

Riccardo83

Thanks for ur prompt answer. Danke

I guess theres no tutorial out there yet so i can see how this could be done?

Joachim Müller

There's a thread that explains what needs to be done for phpbb - see http://forum.coppermine-gallery.net/index.php/topic,41418.0.html
The similar section in the vbulletin bridge file is // Group ids - admin and guest only.
$this->admingroups = array(6);
$this->guestgroup = $this->use_post_based_groups ? 101 : 3;

Riccardo83


Riccardo83

Well like in the link u gave me adding the user to a additional group in vbulletin and adding this group to the bridge file still wont make the user admin in the gallery.

I created the new Usergroup Gallery Admin in vB based on the userrights of Registered users and changed that user to primary group of Gallery Admin.

Then it worked...

Not sure if this is the best solution... well I guess I read through that here too:
http://forum.coppermine-gallery.net/index.php/topic,32903.0.html

What do u think?

Joachim Müller

If you have bridging enabled, the groups from coppermine are not being taken into account, so I'm not sure what you actually did. Anyway, if this works for you, then fine.

Riccardo83

In vB you have primary group = Registered User

and Additional groups = Anything customs you define urself!

Adding the user being primary = registered user to an additional group : 'Gallery admin' wont work.

But in vB you can create new groups based on existing groups.

What I did is created Group 'Gallery Admin' based on 'Registered User' Group Permissions. Then I changed the users Primary Group to: 'Gallery Admin'.

Riccardo83

Would this code work for vBulletin too?

Quote from: Paver on June 21, 2006, 08:46:26 PM

I still recommend adding in *only* the features you want to group 5, and not making them full admins, but here's the simple mod you want.  In include/init.inc.php, add the lines bracketted by // MOD and // MOD - end into the lines you already specified, as shown:
// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
// MOD - add manual admin access
$mod_usergroups = explode(',',substr(USER_GROUP_SET,1,-1));
$mod_allowedgroups = array('5');
$mod_validuser = (array_intersect($mod_allowedgroups,$mod_usergroups) ? true : false);
define('USER_IS_ADMIN_MANUAL', $mod_validuser);
define('GALLERY_ADMIN_MODE', (USER_IS_ADMIN || USER_IS_ADMIN_MANUAL) && $USER['am']);
// MOD - end
define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);


Riccardo83

It doesnt work...

The user I added to Gallery Admin Group as Primary Group caused him to not have any Inbox in vBulletin anymore...

So I need to use the script mentioned in http://forum.coppermine-gallery.net/index.php/topic,32903.0.html

But this doenst work...

// Test if admin mode
$USER['am'] = isset($USER['am']) ? (int)$USER['am'] : 0;
// MOD - add manual admin access
$mod_usergroups = explode(',',substr(USER_GROUP_SET,1,-1));
$mod_allowedgroups = array('5');
$mod_validuser = (array_intersect($mod_allowedgroups,$mod_usergroups) ? true : false);
define('USER_IS_ADMIN_MANUAL', $mod_validuser);
define('GALLERY_ADMIN_MODE', (USER_IS_ADMIN || USER_IS_ADMIN_MANUAL) && $USER['am']);
// MOD - end
define('GALLERY_ADMIN_MODE', USER_IS_ADMIN && $USER['am']);
define('USER_ADMIN_MODE', USER_ID && USER_CAN_CREATE_ALBUMS && $USER['am'] && !GALLERY_ADMIN_MODE);

Riccardo83

Fixed, vB didnt really copy all permissions by creating 'Gallery Admin Group' based on 'Registered User Group'

I adjusted the Gallery Admin Permissions to fit the Registered User permissons and set the user to use 'Gallery Admin" as group one and he is admin in the gallery and has all normal user permission.

Sorry about the confusion!

Still It would be great to know if the code above works....

Joachim Müller

Quote from: Riccardo83 on October 04, 2008, 06:41:34 PM
Still It would be great to know if the code above works....
We can't tell, since none of the devs is using vb. You tell us if it works or not.

Riccardo83

It didnt work, maybe i forgot or did something wrong but i doubt it.

Easiest way for vBulletin to give someone permission to be admin of gallery only create another user permission group like 'REGISTERED USER' and make this group the primary Group of that person.

Add this Group to

// Group ids - admin and guest only.
$this->admingroups = array(6);
$this->guestgroup = $this->use_post_based_groups ? 101 : 3;


Thats it.