Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/lib/Hydra/Controller/User.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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} // "";

Expand Down
4 changes: 3 additions & 1 deletion src/root/topbar.tt
Original file line number Diff line number Diff line change
Expand Up @@ -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 %]

Expand Down