X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/bda0d70b98bd9c9afc5ef8ae83a58497989d6750..e73f7350574cb4e46db4a4d6ad5cdaa075806489:/SL/DB/Employee.pm diff --git a/SL/DB/Employee.pm b/SL/DB/Employee.pm index 1ef565ee6..4cc109a68 100644 --- a/SL/DB/Employee.pm +++ b/SL/DB/Employee.pm @@ -5,5 +5,19 @@ use strict; use SL::DB::MetaSetup::Employee; use SL::DB::Manager::Employee; +__PACKAGE__->meta->initialize; + +sub has_right { + my $self = shift; + my $right = shift; + + return $::auth->check_right($self->login, $right); +} + +sub safe_name { + my ($self) = @_; + + return $self->name || $self->login; +} 1;