Merge branch 'master' of github.com:kivitendo/kivitendo-erp
[kivitendo-erp.git] / SL / DB / Employee.pm
1 package SL::DB::Employee;
2
3 use strict;
4
5 use SL::DB::MetaSetup::Employee;
6 use SL::DB::Manager::Employee;
7
8 __PACKAGE__->meta->initialize;
9
10 sub has_right {
11   my $self  = shift;
12   my $right = shift;
13
14   return $::auth->check_right($self->login, $right);
15 }
16
17 sub safe_name {
18   my ($self) = @_;
19
20   return $self->name || $self->login;
21 }
22
23 1;