Allowing users to move files from own to public album Allowing users to move files from own to public album
 

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]

Main Menu

Allowing users to move files from own to public album

Started by agridoc, October 28, 2005, 01:30:42 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

agridoc

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.

Stramm

try this.. not sure if it works though

in editpics.php find the function get_user_albums() and replace the query with
                $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

#2
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.