$::auth->set_session_value('admin_password', $::lx_office_conf{authentication}->{admin_password});
$::auth->create_or_refresh_session;
$::auth->set_session_value('admin_password', $::lx_office_conf{authentication}->{admin_password});
$::auth->create_or_refresh_session;
my $group = (SL::DB::Manager::AuthGroup->get_all(limit => 1))[0];
if (!$group) {
SL::DB::AuthGroup->new(
name => t8('Full Access'),
description => t8('Full access to all functions'),
my $group = (SL::DB::Manager::AuthGroup->get_all(limit => 1))[0];
if (!$group) {
SL::DB::AuthGroup->new(
name => t8('Full Access'),
description => t8('Full access to all functions'),
- rights => [ map { SL::DB::AuthGroupRight->new(right => $_, granted => 1) } SL::Auth::all_rights() ],
+ rights => [ map { SL::DB::AuthGroupRight->new(right => $_, granted => 1) } $::auth->all_rights ],
sub init_all_printers { SL::DB::Manager::Printer ->get_all_sorted }
sub init_all_dateformats { [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ] }
sub init_all_numberformats { [ '1,000.00', '1000.00', '1.000,00', '1000,00' ] }
sub init_all_printers { SL::DB::Manager::Printer ->get_all_sorted }
sub init_all_dateformats { [ qw(mm/dd/yy dd/mm/yy dd.mm.yy yyyy-mm-dd) ] }
sub init_all_numberformats { [ '1,000.00', '1000.00', '1.000,00', '1000,00' ] }
sub init_all_dbsources { [ sort User->dbsources($::form) ] }
sub init_all_used_dbsources { { map { (join(':', $_->dbhost || 'localhost', $_->dbport || 5432, $_->dbname) => $_->name) } @{ $_[0]->all_clients } } }
sub init_all_accounting_methods { [ { id => 'accrual', name => t8('Accrual accounting') }, { id => 'cash', name => t8('Cash accounting') } ] }
sub init_all_dbsources { [ sort User->dbsources($::form) ] }
sub init_all_used_dbsources { { map { (join(':', $_->dbhost || 'localhost', $_->dbport || 5432, $_->dbname) => $_->name) } @{ $_[0]->all_clients } } }
sub init_all_accounting_methods { [ { id => 'accrual', name => t8('Accrual accounting') }, { id => 'cash', name => t8('Cash accounting') } ] }
my (@sections, $current_section);
foreach my $entry ($::auth->all_rights_full) {
my (@sections, $current_section);
foreach my $entry ($::auth->all_rights_full) {
- if ($entry->[0] =~ m/^--/) {
- push @sections, { description => $entry->[1], rights => [] };
+ if ($entry->[2]) {
+ push @sections, { description => t8($entry->[1]), rights => [] };
$self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version);
}
$self->render('admin/adminlogin', title => t8('kivitendo v#1 administration', $version), %params, version => $version);
}