Convenience: Employee->has_right() als Wrapper um $::auth->check_right()
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 6 Oct 2010 15:40:30 +0000 (17:40 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Thu, 13 Jan 2011 11:38:14 +0000 (12:38 +0100)
SL/DB/Employee.pm

index 1ef565e..8688e82 100644 (file)
@@ -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;