Album permission for multiple user groups Album permission for multiple user groups
 

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

Album permission for multiple user groups

Started by carterb, October 07, 2013, 10:15:46 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

carterb

Hi everybody -

I'm currently adapting the album permissions on my coppermine. What I want to achieve is, that multiple user groups have the permission to view/change one album. In the current version, coppermine only supports one group per album.

What I already did:

  • To store multiple group permissions in the cpg15x_albums database, I changed the field to varchar and adapted the read/write progress in modifyalb.php to store the different group permissions comma separated (see attachment).
  • Adapted the album properties dialog (see attachment).

To-Do:

Now I need to adapt the various processes, that read out the permissions. Thats the point where I need some help.

  • Locate all these processes.
  • Get hints on how to adapt them.

Any help is welcome.

Cheers,
Oliver

carterb

Hi again -

I saw that the feature is planed for V1.6. Maybe I can support the developers with my work.

PS.: Maybe the thread should be moved to cpg1.5 permissions, sorry for that!

Cheers,
Oliver

phill104

We definitely need a more granular permissions system so any help coding such is always much appreciated.
It is a mistake to think you can solve any major problems just with potatoes.

carterb

Hi again -

I'm willing to help. Maybe anyone could tell me (or give me a hint to documentation) where I can find the processes, that read out the visibility field. I also do not really understand how the visibility field is analyzed yet.

Question is, if there is a more detailled plan on how the permissions should be adapted?

Cheers,
Oliver

Αndré

I was never happy that Coppermine's database violates the first normal form, but that's out of focus for this mod.

For a start, we should have a closer look at the variables $RESTRICTEDWHERE and FORBIDDEN_SET_DATA and how exactly they're populated, as they're used at least for the thumbnail, intermediate-sized and full-sized view. Maybe they also effect the album view.

carterb

Hi -

Ok, I also figured out that $FORBIDDEN_SET_DATA should be interesting. I will have a look at it tonight.

Cheers,
Oliver

carterb

Hi all -

After some months without any chance to work on the coppermine, I will now be able to spend some time.
Please let me know if any further development has already started. Otherwise I go back to the $RESTRICTEDWHERE and $FORBIDDEN_SET_DATA...

Cheers,
Oliver

Αndré

As far as I know nobody worked on this mod. The Coppermine core code hasn't changed in that aspect.