From c7176e6155cd227ab5ce99d7a02d08982edf1499 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 6 Oct 2010 17:40:30 +0200 Subject: [PATCH] Convenience: Employee->has_right() als Wrapper um $::auth->check_right() --- SL/DB/Employee.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/SL/DB/Employee.pm b/SL/DB/Employee.pm index 1ef565ee6..8688e8297 100644 --- a/SL/DB/Employee.pm +++ b/SL/DB/Employee.pm @@ -5,5 +5,11 @@ use strict; use SL::DB::MetaSetup::Employee; use SL::DB::Manager::Employee; +sub has_right { + my $self = shift; + my $right = shift; + + return $::auth->check_right($self->login, $right); +} 1; -- 2.20.1