X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FEmployee.pm;h=92444551e54e604cec32f55a505a2b4f0d77388a;hb=7c60c2423f6fd27a78cf89ca62821ea1e41e85f5;hp=841696b6ed295ff9eeab9100aa9c9d3362038c7b;hpb=4fd22b569d4436293e0a9d364d7356b5bfc503e5;p=kivitendo-erp.git diff --git a/SL/DB/Employee.pm b/SL/DB/Employee.pm index 841696b6e..92444551e 100644 --- a/SL/DB/Employee.pm +++ b/SL/DB/Employee.pm @@ -1,13 +1,21 @@ -# This file has been auto-generated only because it didn't exist. -# Feel free to modify it at will; it will not be overwritten automatically. - package SL::DB::Employee; 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); +} + +sub safe_name { + my ($self) = @_; -# Creates get_all, get_all_count, get_all_iterator, delete_all and update_all. -__PACKAGE__->meta->make_manager_class; + return $self->name || $self->login; +} 1;