Demo Discussion
Forum Config Examples Contributions Vulnerabilities
  Discussion forum about ELOG  Not logged in ELOG logo
icon5.gif   Config so that users can delete only their own entries?, posted by Dennis Seitz on Wed Apr 15 17:57:19 2009 
    icon2.gif   Re: Config so that users can delete only their own entries?, posted by Stefan Ritt on Thu Apr 16 08:34:03 2009 
       icon2.gif   Re: Config so that users can delete only their own entries?, posted by Dennis Seitz on Sat Apr 18 00:33:53 2009 
Message ID: 66323     Entry time: Sat Apr 18 00:33:53 2009     In reply to: 66321
Icon: Reply  Author: Dennis Seitz  Author Email: dseitz@berkeley.edu 
Category: Question  OS: All  ELOG Version: 2.7.5 
Subject: Re: Config so that users can delete only their own entries? 
Thanks for reminding me of that, it will do fine. A suggestion: Separate Restrict Edit into Restrict Edit and Restrict Delete or some functional equivalent. Then we have the choice to restrict one or the other or both. Is that worth doing?


Stefan Ritt wrote:

Dennis Seitz wrote:
I've tried

Deny_Delete = All
Allow Delete = $author

and just
Allow Delete = $author

But either users can delete anyone's entries, or they can't delete any entries.

Am I missing something? If not, can you add the capability to allow users to delete, but only their own entries?

Thanks as usual for a great piece of code!


You cannot put $author into any Allow or Deny option, only explicit login names (not "full" names). What you want however is
Restrict Edit = 1

which lets only the original author either delete or edit entries. If you use that option, you probably want as well
Preset Author = $long_name
Preset on reply Author = $long_name
Preset on duplicate Author = $long_name
Locked Attributes = Author

So a user cannot pretend to be somebody else. You also need a valid "admin user = ..." statement. Note that the admin user always can delete/edit entries. If no admin user is defined, everybody has automatically admin rights, so Restrict Edit has no effect.
ELOG V3.1.5-fe60aaf