|
Lines 90-95
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 |
| 93 |
unless ( C4::Context->preference('OpacPasswordChange') ) { |
94 |
unless ( C4::Context->preference('OpacPasswordChange') ) { |
| 94 |
return $c->render( |
95 |
return $c->render( |
| 95 |
status => 403, |
96 |
status => 403, |
|
Lines 108-113
sub set_public {
Link Here
|
| 108 |
); |
109 |
); |
| 109 |
} |
110 |
} |
| 110 |
|
111 |
|
|
|
112 |
unless ( $user->category->effective_change_password ) { |
| 113 |
return $c->render( |
| 114 |
status => 403, |
| 115 |
openapi => { |
| 116 |
error => "Changing password is forbidden" |
| 117 |
} |
| 118 |
); |
| 119 |
} |
| 120 |
|
| 111 |
my $old_password = $body->{old_password}; |
121 |
my $old_password = $body->{old_password}; |
| 112 |
my $password = $body->{password}; |
122 |
my $password = $body->{password}; |
| 113 |
my $password_2 = $body->{password_repeated}; |
123 |
my $password_2 = $body->{password_repeated}; |
| 114 |
- |
|
|