forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Permissions & Access Rights => Topic started by: agridoc on October 28, 2005, 01:30:42 pm

Title: Allowing users to move files from own to public album
Post by: agridoc on October 28, 2005, 01:30:42 pm
I just found a working solution for Allowing users to edit their uploaded files (http://forum.coppermine-gallery.net/index.php?topic=15126.0).

Finding a way of allowing users to move files from own to public album will match this modification to a strong pair.
Title: Re: Allowing users to move files from own to public album
Post by: Stramm 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.   
Title: Re: Allowing users to move files from own to public album
Post by: agridoc 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.