From: Moritz Bunkus Date: Wed, 6 Oct 2010 15:40:30 +0000 (+0200) Subject: Convenience: Employee->has_right() als Wrapper um $::auth->check_right() X-Git-Tag: release-2.6.3~61^2~7^2~1^2~2^2~30 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c7176e6155cd227ab5ce99d7a02d08982edf1499;p=kivitendo-erp.git Convenience: Employee->has_right() als Wrapper um $::auth->check_right() --- 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;