Merge branch 'clients'
[kivitendo-erp.git] / bin / mozilla / login.pl
index caf49c4..25379dd 100644 (file)
@@ -27,9 +27,7 @@
 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 #######################################################################
 
-use DBI;
-use SL::Auth;
-use SL::User;
+use SL::DB::Default;
 use SL::Form;
 use SL::Git;
 
@@ -46,11 +44,13 @@ sub company_logo {
   $main::lxdebug->enter_sub();
 
   my %myconfig = %main::myconfig;
-  $form->{todo_list}  =  create_todo_list('login_screen' => 1) if (!$form->{no_todo_list});
+  $form->{todo_list}  =  create_todo_list('login_screen' => 1) if (!$form->{no_todo_list}) and ($main::auth->check_right($form->{login}, 'productivity'));
 
   $form->{stylesheet} =  $myconfig{stylesheet};
   $form->{title}      =  $::locale->text('kivitendo');
   $form->{interface}  = $::dispatcher->interface_type;
+  $form->{client}     = $::auth->client;
+  $form->{defaults}   = SL::DB::Default->get;
 
   my $git             = SL::Git->new;
   ($form->{git_head}) = $git->get_log(since => 'HEAD~1', until => 'HEAD') if $git->is_git_installation;