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: Allowing users to move files from own to public album  (Read 3966 times)

0 Members and 1 Guest are viewing this topic.

agridoc

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • Aeromodelling GR - Aeromodelling in Greece
Allowing users to move files from own to public album
« on: October 28, 2005, 01:30:42 pm »

I just found a working solution for Allowing users to edit their uploaded files.

Finding a way of allowing users to move files from own to public album will match this modification to a strong pair.
« Last Edit: October 30, 2005, 01:33:59 pm by GauGau »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Allowing users to move files from own to public album
« Reply #1 on: October 28, 2005, 02:11:26 pm »

try this.. not sure if it works though

in editpics.php find the function get_user_albums() and replace the query with
Code: [Select]
                $user_albums = db_query("SELECT aid, title FROM {$CONFIG['TABLE_ALBUMS']} WHERE category='".(FIRST_USER_CAT + $user_id)."' OR category <'".(FIRST_USER_CAT)."' AND uploads='YES' AND visibility = '0' OR visibility IN ".USER_GROUP_SET." ORDER BY title");

I don't like it cause you can get around some restrictions. So it needs more fiddling around with.
Example: Pub. Upl. approval = YES, Priv. Upl. approval  = NO... users just need to upload into their private album and then move into the public one.   

agridoc

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 20
    • Aeromodelling GR - Aeromodelling in Greece
Re: Allowing users to move files from own to public album
« Reply #2 on: October 29, 2005, 12:02:12 am »

Thank you Stramm for your help. I did a quick test.

It works but, as you said it, goes around restrictions. I didn't play with approvals as I have set upload approval to NO for private as well as for public albums.

By using this modification a user can move a file from his own album to ANY album, public or personal, more than the administrator is usually allowed to do.

I think with some refinement in the query it can be made to work OK.
« Last Edit: October 29, 2005, 08:35:58 am by agridoc »
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 19 queries.