Commit b29552d8 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

test: SSO tweaks

PR #1513
parent 45e0669d
......@@ -2061,7 +2061,7 @@ sub login($c, $status=200) {
$c->session(auto_view => $auto_view, expiration => $expiration);
app->log->info("Access granted to $login from "._remote_ip($c)) if $CONFIG_FRONT->{log}->{log};
return $c->redirect_to($url);
} elsif (defined $c->param('submit')) {
} elsif (defined $c->param('submit') || $login || $password) {
app->log->error("Access denied to $login from "._remote_ip($c)) if $CONFIG_FRONT->{log}->{log};
push @error,("Access denied");
}
......
......@@ -178,7 +178,7 @@ sub test_login_fail {
$t->post_ok('/login' => form => {login => "fail", password => 'bigtime'});
is($t->tx->res->code(),403);
$t->get_ok("/admin/machines")->status_is(401);
is($t->tx->res->dom->at("button#submit")->text,'Login') or exit;
like($t->tx->res->dom->at("button#submit")->text,qr'Login') or exit;
login( user_admin->name, "$$ $$");
......@@ -186,7 +186,7 @@ sub test_login_fail {
is($t->tx->res->code(),403);
$t->get_ok("/admin/machines")->status_is(401);
is($t->tx->res->dom->at("button#submit")->text,'Login') or exit;
like($t->tx->res->dom->at("button#submit")->text,qr'Login') or exit;
}
sub test_validate_html($url) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment