X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FDispatcher%2FAuthHandler%2FAdmin.pm;h=ebb4a4d3f9ec469fc1dd31df9cb5c9464bec7f83;hb=1c9c1ad92b3558fbd11e2ebb0031da402d279537;hp=ad7c1f413511eead7ac8366b4652941ce6449b20;hpb=a4c3e9de7b3169ac6a0ad270022da9aeed91f9ff;p=kivitendo-erp.git diff --git a/SL/Dispatcher/AuthHandler/Admin.pm b/SL/Dispatcher/AuthHandler/Admin.pm index ad7c1f413..ebb4a4d3f 100644 --- a/SL/Dispatcher/AuthHandler/Admin.pm +++ b/SL/Dispatcher/AuthHandler/Admin.pm @@ -10,7 +10,7 @@ sub handle { %::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';