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