X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FEmployee.pm;h=4cc109a6802a6a8257970fc50a8cda5476bf78c8;hb=d0b6041775e664944a6228f2c99cb470dd69bb1f;hp=8688e829723e680b2a676a06dda42c0e19627580;hpb=3a94f4d2dd9a835d4a7007e1b999ea00b3c4e1cd;p=kivitendo-erp.git 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;