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: Hack needed for additional album permissions  (Read 4933 times)

0 Members and 1 Guest are viewing this topic.

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Hack needed for additional album permissions
« on: August 05, 2010, 08:43:25 pm »

I fear I can't wait any longer for the long-requested but still far-out-of-sight-ability to grant more than one usergroup the permission to see an album.

That's why I want to apply a hack that allows ONE additional, 'hardcoded' usergroup to access all albums with (for example) album_id > 648.

As I don't fully yet understand how CPG manages it's permissions interenally: could anybody give me a hint where such a hack should be applied?

Thanks in advance for any kind of help!
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hack needed for additional album permissions
« Reply #1 on: August 17, 2010, 10:49:25 am »

Which user group has access to a particular album is stored in the field visibility. Search in the Coppermine code for this word. You could change the int value to an array and check against that array while determining if the user has access or not. Finally change the drop down box to a 'multiple select box' (don't know the correct name now).

I think we can apply those changes to cpg1.5.x, as we don't need new language strings as far as I can see.
Logged

lamama

  • Contributor
  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 404
Re: Hack needed for additional album permissions
« Reply #2 on: August 17, 2010, 06:42:42 pm »

Thanks, that was the kind of hint I needed. Will take a few days until I find the time to look at it (holidays are over...).

I think we can apply those changes to cpg1.5.x, as we don't need new language strings as far as I can see.

THAT woud be really cool.

Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: Hack needed for additional album permissions
« Reply #3 on: August 17, 2010, 07:53:02 pm »

You could change the int value to an array and check against that array
Please have a look how this is solved for additional user groups. We store them comma seperated. That's not the best solution regarding third database normal form (don't know if this is the correct English expression), but it works.
Logged
Pages: [1]   Go Up
 

Page created in 0.02 seconds with 20 queries.