X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher%2FAuthHandler%2FAdmin.pm;h=06fd3cfe3c2991b42f831ddadf2788aef57ec1c6;hb=97e26b6903f9049ecbaec55266bad5e362de4408;hp=babdc223a58c1caddd4a1e24a04772b6bf30803c;hpb=32b79fa8495846e993a7130fc9271ca39e2e6c44;p=kivitendo-erp.git diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm index babdc223a..06fd3cfe3 100644 --- a/SL/Dispatcher/AuthHandler/Admin.pm +++ b/SL/Dispatcher/AuthHandler/Admin.pm @@ -8,9 +8,9 @@ use SL::Layout::Dispatcher; sub handle { my ($self, %params) = @_; - %::myconfig = (); + %::myconfig = User->get_default_myconfig; - my $ok = $::auth->get_api_token_cookie ? 1 : 0; + my $ok = $::auth->is_api_token_cookie_valid; $ok ||= $::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::form->{'{AUTH}admin_password'}) == $::auth->OK()); $ok ||= !$::form->{'{AUTH}admin_password'} && ($::auth->authenticate_root($::auth->get_session_value('admin_password')) == $::auth->OK()); $ok ||= $params{action} eq 'login';