Koha-clms/members
Marc Véron 1b5ec8c509 Bug 13910: Prevent delete of one's own patron account
This patch adds a check to prevent deleting the user's own account.
Additionali it fixes a "missing link" in moremember.pl and wrong comparisions in moremember.tt regarding other forbidden deleting.

To test:
- Apply patch
- Create a user with sufficient privileges to delete users
- Log in as this new user
- Try to delete this user. Confirm message box "Are you sure..."
- Confirm that you get a message "Not allowed to delete own account" and that the user still exists.

Bonus test:
Try to trigger other forbidden deletions (see members/deletemem.pl): 'CANT_DELETE_STAFF', 'CANT_DELETE_OTHERLIBRARY', 'CANT_DELETE'
(You can fake it by using an URL like: /cgi-bin/koha/members/moremember.pl?borrowernumber=115&error=CANT_DELETE_STAFF  etc.)
Without patch, no message appears. With patch, messages appear as appropriate.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

NOTE: Attempted all CANT combinations. From reading the code,
this is kind of an important patch, because I'm not sure
deleting error messages work at all right now based on what
I read.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
(cherry picked from commit 1a54f0916e)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2015-05-18 10:57:11 +12:00
..
boraccount.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
default_messageprefs.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
deletemem.pl Bug 13910: Prevent delete of one's own patron account 2015-05-18 10:57:11 +12:00
files.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
guarantor_search.pl Bug 11349: Change .tmpl -> .tt in scripts using templates 2014-07-17 11:05:49 -03:00
mancredit.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
maninvoice.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
member-flags.pl Bug 12542: Tabs inconsistency in different circ-menu.inc uses 2014-07-18 10:41:27 -03:00
member-password.pl Bug 12542: Tabs inconsistency in different circ-menu.inc uses 2014-07-18 10:41:27 -03:00
member.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
memberentry.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
members-home.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
members-update-do.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
members-update.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
mod_debarment.pl Bug 12069: redirect to staff login if you access members/mod_debarment.pl when logged out 2014-04-12 18:00:18 +00:00
moremember.pl Bug 13910: Prevent delete of one's own patron account 2015-05-18 10:57:11 +12:00
nl-search.pl Bug 11401: Add support for Norwegian national library card 2014-11-14 09:42:23 -03:00
notices.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
patronimage.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
pay.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
paycollect.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
printfeercpt.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
printinvoice.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
printslip.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
purchase-suggestions.pl Bug 12542: Tabs inconsistency in different circ-menu.inc uses 2014-07-18 10:41:27 -03:00
readingrec.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
routing-lists.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
setstatus.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00
statistics.pl Bug 12693 - colspan calculation done by members/statistics.pl should be moved to template 2014-08-11 15:47:14 -03:00
summary-print.pl Bug 10423: Show date due with time if it's a hourly loan 2015-05-17 15:51:50 +12:00
update-child.pl Bug 9978: Replace license header with the correct license (GPLv3+) 2015-04-22 11:28:36 +12:00