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: Gallery Admin = vBulletin Admin does that has to be?  (Read 8490 times)

0 Members and 1 Guest are viewing this topic.

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Gallery Admin = vBulletin Admin does that has to be?
« on: October 04, 2008, 03:48:30 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #1 on: October 04, 2008, 03:52:30 pm »

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

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #2 on: October 04, 2008, 03:57:51 pm »

Thanks for ur prompt answer. Danke

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #3 on: October 04, 2008, 04:05:07 pm »

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
Code: [Select]
// Group ids - admin and guest only.
$this->admingroups = array(6);
$this->guestgroup = $this->use_post_based_groups ? 101 : 3;
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #4 on: October 04, 2008, 04:18:51 pm »

Again thanks for this great support!
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #5 on: October 04, 2008, 04:49:15 pm »

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?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #6 on: October 04, 2008, 04:50:29 pm »

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

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #7 on: October 04, 2008, 04:56:39 pm »

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'.
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #8 on: October 04, 2008, 05:01:47 pm »

Would this code work for vBulletin too?


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:
Code: [Select]
// 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);
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #9 on: October 04, 2008, 06:20:28 pm »

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

Code: [Select]
// 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);
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #10 on: October 04, 2008, 06:41:34 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #11 on: October 05, 2008, 12:08:54 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.
Logged

Riccardo83

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 38
Re: Gallery Admin = vBulletin Admin does that has to be?
« Reply #12 on: October 05, 2008, 01:02:22 pm »

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

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

Thats it.
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 20 queries.