coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: EliteRides on October 13, 2005, 05:17:18 PM

Title: How do I disallow users from being able to delete their pics?
Post by: EliteRides on October 13, 2005, 05:17:18 PM
I searched, I promise.  I only came up with ways to delete things.
Title: Re: How do I disallow users from being able to delete their pics?
Post by: Stramm on October 13, 2005, 05:46:27 PM
If you have some time I'll dig out again what I've done... not very difficult, just an if clause at some places
Title: Re: How do I disallow users from being able to delete their pics?
Post by: EliteRides on October 13, 2005, 05:55:28 PM
That would be greatly appreciated.
Title: Re: How do I disallow users from being able to delete their pics?
Post by: Stramm on October 13, 2005, 07:50:01 PM
in delete.php find
   case 'picture':
and
    case 'album':

in the line below each delete || USER_ADMIN_MODE

then find
function delete_album($aid)
{

below add
    if (!(GALLERY_ADMIN_MODE)) return;

when a user's browsing the gallery in user admin mode he'll still see the delete picture/ album buttons. But he'll get a 'no permission' message when he's clicking it.
In the album manager the delete button is visible too. Here the user won't get an error message. The system just won't delete the album..
to delete the buttons you'd have to modify albmgr.php , either theme.php (template_album_admin_menu) or function html_albummenu (index.php) and function html_picture_menu (displayimage.php)

I haven't tested it but it should work
Title: Re: How do I disallow users from being able to delete their pics?
Post by: Nibbler on October 13, 2005, 08:12:17 PM
http://forum.coppermine-gallery.net/index.php?topic=22459.msg103012#msg103012
Title: Re: How do I disallow users from being able to delete their pics?
Post by: Bill Latham on October 14, 2005, 06:39:26 AM
Is it possible to create a modification that allows toggling from the configuration settings page, or better, select/create a group for certain users, who when are placed into this new group, are given delete permissions?

Thanks in advance,
Bill