Bugzilla – Attachment 106159 Details for
Bug 23634
Privilege escalation vulnerability for staff users with 'edit_borrowers' permission and 'OpacResetPassword' enabled
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23634: Add is_superlibrarian method to Koha::Patron
Bug-23634-Add-issuperlibrarian-method-to-KohaPatro.patch (text/plain), 995 bytes, created by
Martin Renvoize (ashimema)
on 2020-06-22 11:42:31 UTC
(
hide
)
Description:
Bug 23634: Add is_superlibrarian method to Koha::Patron
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2020-06-22 11:42:31 UTC
Size:
995 bytes
patch
obsolete
>From 95e613e25543096f0c763650d9664f8033eb0b65 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 19 Nov 2019 14:11:34 +0000 >Subject: [PATCH] Bug 23634: Add is_superlibrarian method to Koha::Patron > >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > Koha/Patron.pm | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > >diff --git a/Koha/Patron.pm b/Koha/Patron.pm >index 5436ccc448..42bd0886e5 100644 >--- a/Koha/Patron.pm >+++ b/Koha/Patron.pm >@@ -1361,6 +1361,19 @@ sub has_permission { > return C4::Auth::haspermission( $self->userid, $flagsrequired ); > } > >+=head3 is_superlibrarian >+ >+ my $is_superlibrarian = $patron->is_superlibrarian; >+ >+Return true if the patron is a superlibrarian. >+ >+=cut >+ >+sub is_superlibrarian { >+ my ($self) = @_; >+ return $self->has_permission( { superlibrarian => 1 } ); >+} >+ > =head3 is_adult > > my $is_adult = $patron->is_adult >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23634
:
92932
|
92998
|
95563
|
95564
|
95574
|
95575
|
95576
|
95577
|
95582
|
97986
|
97987
|
97988
|
97989
|
97990
|
106159
|
106160
|
106161
|
106162
|
106163
|
106723
|
106724
|
106725
|
106726
|
106727
|
106764
|
106826
|
106837
|
106838
|
106839
|
106840
|
106841
|
106842
|
106843
|
106844
|
106979
|
106980
|
106981
|
106982
|
106983
|
106984
|
106985
|
106986
|
109582