Advanced search  

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

Pages: [1]   Go Down

Author Topic: trying to edit bridge files to change permissions  (Read 4789 times)

0 Members and 1 Guest are viewing this topic.

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
trying to edit bridge files to change permissions
« 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
Code: [Select]
// 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
Code: [Select]
// 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
Logged

Nibbler

  • Guest
Re: trying to edit bridge files to change permissions
« Reply #1 on: August 05, 2008, 01:20:33 pm »

It's a ternary operator. Your code is fine.
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: trying to edit bridge files to change permissions
« Reply #2 on: August 05, 2008, 06:26:11 pm »

thank you nibbler
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: trying to edit bridge files to change permissions
« Reply #3 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?
Logged

Nibbler

  • Guest
Re: trying to edit bridge files to change permissions
« Reply #4 on: August 05, 2008, 06:41:16 pm »

Find

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

After that, add
Code: [Select]
echo 'User is in groups: ';
print_r($USER_DATA['groups']);
echo 'Admin groups are: ';
print_r($this->admingroups);
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: trying to edit bridge files to change permissions
« Reply #5 on: August 05, 2008, 06:46:35 pm »

Quote
User 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
Logged

Hot Rides

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 108
  • I am
    • Hot Rides Show & Cruise
Re: trying to edit bridge files to change permissions
« Reply #6 on: August 05, 2008, 06:48:57 pm »

that got it, thanks again, im getting better at this stuff from the help i receive
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.