Compare commits

...

1 Commits

Author SHA1 Message Date
Janne Heß
d2b0dce05f Add option to disable local auth 2026-01-05 22:54:27 +01:00
2 changed files with 5 additions and 1 deletions

View File

@@ -25,6 +25,8 @@ sub login :Local :Args(0) :ActionClass('REST') { }
sub login_POST {
my ($self, $c) = @_;
badRequest($c, "Local authentication is disabled.") if $c->config->{disable_local_auth};
my $username = $c->stash->{params}->{username} // "";
my $password = $c->stash->{params}->{password} // "";

View File

@@ -146,7 +146,9 @@
<a class="dropdown-item" href="/github-redirect?after=[% c.req.path | uri %]">Sign in with GitHub</a>
<div class="dropdown-divider"></div>
[% END %]
<a class="dropdown-item" href="#hydra-signin" data-toggle="modal">Sign in with a Hydra account</a>
[% UNLESS c.config.disable_local_auth %]
<a class="dropdown-item" href="#hydra-signin" data-toggle="modal">Sign in with a Hydra account</a>
[% END %]
[% END %]
[% END %]