safe_name methode in Employee
authorSven Schöling <s.schoeling@linet-services.de>
Fri, 10 Feb 2012 16:05:41 +0000 (17:05 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Fri, 10 Feb 2012 16:05:41 +0000 (17:05 +0100)
Wird für Anzeige gebraucht

SL/DB/Employee.pm

index 8688e82..9244455 100644 (file)
@@ -12,4 +12,10 @@ sub has_right {
   return $::auth->check_right($self->login, $right);
 }
 
+sub safe_name {
+  my ($self) = @_;
+
+  return $self->name || $self->login;
+}
+
 1;