From 57a728bd60e04fd586a5546e71603bf91645404f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 14 Jun 2013 16:45:05 +0200 Subject: [PATCH] =?utf8?q?Task-Server=20mandantenf=C3=A4hig=20gemacht?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- config/kivitendo.conf.default | 6 +++++- scripts/task_server.pl | 9 ++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/config/kivitendo.conf.default b/config/kivitendo.conf.default index 0a2a97f41..0352b4371 100644 --- a/config/kivitendo.conf.default +++ b/config/kivitendo.conf.default @@ -166,7 +166,11 @@ openofficeorg_daemon = 1 openofficeorg_daemon_port = 2002 [task_server] -# User name to use for database access +# kivitendo client (either its name or its database ID) for database +# access (both 'client' and 'login' are required) +client = +# kivitendo user (login) name to use for certain jobs (both 'client' +# and 'login' are required) login = # Set to 1 for debug messages in /tmp/kivitendo-debug.log debug = 0 diff --git a/scripts/task_server.pl b/scripts/task_server.pl index 3a45dd1b4..c8ad935f0 100755 --- a/scripts/task_server.pl +++ b/scripts/task_server.pl @@ -41,7 +41,8 @@ use SL::System::TaskServer; our %lx_office_conf; sub lxinit { - my $login = $lx_office_conf{task_server}->{login}; + my $login = $lx_office_conf{task_server}->{login}; + my $client = $lx_office_conf{task_server}->{client}; package main; @@ -49,6 +50,7 @@ sub lxinit { $::locale = Locale->new($::lx_office_conf{system}->{language}); $::form = Form->new; $::auth = SL::Auth->new; + die "No client configured or no client found with the name/ID '$client'" unless $::auth->set_client($client); $::instance_conf = SL::InstanceConfiguration->new; $::request = { cgi => CGI->new({}) }; @@ -95,8 +97,9 @@ sub gd_preconfig { SL::LxOfficeConf->read($self->{configfile}); - die "Missing section [task_server] in config file" unless $lx_office_conf{task_server}; - die "Missing key 'login' in section [task_server] in config file" unless $lx_office_conf{task_server}->{login}; + die "Missing section [task_server] in config file" unless $lx_office_conf{task_server}; + die "Missing key 'login' in section [task_server] in config file" unless $lx_office_conf{task_server}->{login}; + die "Missing key 'client' in section [task_server] in config file" unless $lx_office_conf{task_server}->{client}; drop_privileges(); lxinit(); -- 2.20.1