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> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
This commit is contained in:
parent
781c90b3f7
commit
b8329f7da7
|
|
@ -1339,6 +1339,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
|
||||
|
|
|
|||
Loading…
Reference in New Issue