Lines 90-103
sub set_public {
Link Here
|
90 |
my $body = $c->validation->param('body'); |
90 |
my $body = $c->validation->param('body'); |
91 |
my $patron_id = $c->validation->param('patron_id'); |
91 |
my $patron_id = $c->validation->param('patron_id'); |
92 |
|
92 |
|
93 |
# short-circuit early |
|
|
94 |
unless ( C4::Context->preference('OpacPasswordChange') ) { |
95 |
return $c->render( |
96 |
status => 403, |
97 |
openapi => { error => "Configuration prevents password changes by unprivileged users" } |
98 |
); |
99 |
} |
100 |
|
101 |
my $user = $c->stash('koha.user'); |
93 |
my $user = $c->stash('koha.user'); |
102 |
|
94 |
|
103 |
unless ( $user->borrowernumber == $patron_id ) { |
95 |
unless ( $user->borrowernumber == $patron_id ) { |