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: How do I disallow users from being able to delete their pics?  (Read 3992 times)

0 Members and 1 Guest are viewing this topic.

EliteRides

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • EliteRides.com
How do I disallow users from being able to delete their pics?
« on: October 13, 2005, 05:17:18 pm »

I searched, I promise.  I only came up with ways to delete things.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How do I disallow users from being able to delete their pics?
« Reply #1 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

EliteRides

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 56
    • EliteRides.com
Re: How do I disallow users from being able to delete their pics?
« Reply #2 on: October 13, 2005, 05:55:28 pm »

That would be greatly appreciated.

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How do I disallow users from being able to delete their pics?
« Reply #3 on: October 13, 2005, 07:50:01 pm »

in delete.php find
   case 'picture':
and
    case 'album':

in the line below each delete
Code: [Select]
|| USER_ADMIN_MODE
then find
Code: [Select]
function delete_album($aid)
{
below add
Code: [Select]
    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

Bill Latham

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: How do I disallow users from being able to delete their pics?
« Reply #5 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
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 15 queries.