X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDB%2FEmployee.pm;h=4cc109a6802a6a8257970fc50a8cda5476bf78c8;hb=2647d6943850866ac437660e0a16ea965c01c22b;hp=841696b6ed295ff9eeab9100aa9c9d3362038c7b;hpb=f9676efea9ccfa01df2a57dca9c45cc8fde0d09e;p=kivitendo-erp.git diff --git a/SL/DB/Employee.pm b/SL/DB/Employee.pm index 841696b6e..4cc109a68 100644 --- a/SL/DB/Employee.pm +++ b/SL/DB/Employee.pm @@ -1,13 +1,23 @@ -# 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; + +__PACKAGE__->meta->initialize; + +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;