coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 bridging => Topic started by: Hot Rides on August 04, 2008, 10:28:11 PM

Title: trying to edit bridge files to change permissions
Post by: Hot Rides on August 04, 2008, 10:28:11 PM
Im trying to give a user group admin rights in coppermine without giving them admin rights in smf as i dont want them to appear as forum admins.

through searching I found what I was suppossed to edit, but the coding is different as expected and now im not sure how to edit it.

this is what I was supposed to find

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

101 is the cpm admin group
1 is the smf admin group
im guessing the ":" is an equal
the group im wanting to add is 13

I was figuring I would need to change it to this

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

but my text editor made it seem like it was incorrect
what am I missing?????


thanks in advance
Title: Re: trying to edit bridge files to change permissions
Post by: Nibbler on August 05, 2008, 01:20:33 PM
It's a ternary operator. Your code is fine.
Title: Re: trying to edit bridge files to change permissions
Post by: Hot Rides on August 05, 2008, 06:26:11 PM
thank you nibbler
Title: Re: trying to edit bridge files to change permissions
Post by: Hot Rides on August 05, 2008, 06:34:23 PM
I changed the code and it did not give the desired effect, actually apperas that it did nothing. I even ran update.php thinking it might help. any ideas?
Title: Re: trying to edit bridge files to change permissions
Post by: Nibbler on August 05, 2008, 06:41:16 PM
Find


$USER_DATA['can_see_all_albums'] = $USER_DATA['has_admin_access'] = array_intersect($USER_DATA['groups'],$this->admingroups) ? 1 : 0;


After that, add

echo 'User is in groups: ';
print_r($USER_DATA['groups']);
echo 'Admin groups are: ';
print_r($this->admingroups);
Title: Re: trying to edit bridge files to change permissions
Post by: Hot Rides on August 05, 2008, 06:46:35 PM
QuoteUser is in groups: Array (
  • => 102 [1] => 113 [2] => 109 ) Admin groups are: Array (
  • => 101 [1] => 13 )
It looks like its adding 100 to all smf member groups i'm gonna change 13 to 113 and see
Title: Re: trying to edit bridge files to change permissions
Post by: Hot Rides on August 05, 2008, 06:48:57 PM
that got it, thanks again, im getting better at this stuff from the help i receive