Koha-clms/members
Petro Vashchuk 1dd5b493ac Bug 28759: limit accessibility for "Manage API keys"
This patch limits the accessibility for "Manage API keys" section only
to superlibrarians and the owner of that said API key account.

The way it does it is by checking if user is superlibrarian or if
logged-in user is the same as a patron id/borrower number is the same
as logged-in user number both in template and apikeys.pl and making sure
the link is inaccessible or redirects to the 403 page if user tries to
go there directly.

To reproduce:
1) create/pick existing patron, set Staff access, allows viewing
of catalogue in staff interface (catalogue)" and "Add, modify and
iew patron information (borrowers)" permissions on;
2) enable "RESTOAuth2ClientCredentials" in sysprefs;
3) login with that user into staff interface;
4) check any other patron, go to the "More"->"Manage API keys" and
check that you can see, add delete their API keys;
5) apply patch;
6) with that same user try to access "Manage API keys" page again.
Ensure that you can't access that page of other patrons but can
access your own page and manage your own API keys.
7) log in with superlibrarian now and ensure that you can access every
"Manage API keys" page of every patron and apply changes there.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
2021-09-20 20:21:00 -10:00
..
accountline-details.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
apikeys.pl Bug 28759: limit accessibility for "Manage API keys" 2021-09-20 20:21:00 -10:00
boraccount.pl Bug 27796: Centralise payment/transaction type handling 2021-04-22 15:51:19 +02:00
cancel-charge.pl Bug 24603: Adjust permissions for cancel-charge.pl 2020-11-10 15:00:14 +01:00
default_messageprefs.pl
…
deletemem.pl Bug 27144: Fix syntax error that prevents deleting patrons 2020-12-04 16:46:20 +01:00
discharge.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
discharges.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
files.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
guarantor_search.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
holdshistory.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
housebound.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
ill-requests.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
mancredit.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
maninvoice.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
member-flags.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
member-password.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
member.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
memberentry.pl Bug 28935: (QA follow-up) Use BorrowerUnwantedField on staff client 2021-09-20 20:21:00 -10:00
members-home.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members-update-do.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
members-update.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
merge-patrons.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
mod_debarment.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
moremember.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
notices.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
patronimage.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
pay.pl Bug 28147: Pass itemnumber through to Account->pay 2021-04-22 16:00:03 +02:00
paycollect.pl Bug 24786: Update paycollect to use session register 2020-11-06 15:39:59 +01:00
print_overdues.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
printfeercpt.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
printinvoice.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
printslip.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
purchase-suggestions.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
readingrec.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
routing-lists.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
setstatus.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
statistics.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
summary-print.pl Bug 24663: Remove authnotrequired if set to 0 2020-09-03 10:40:35 +02:00
update-child.pl Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00