MT#59449 fix perform_auth to send correct realm to ban check

* perform_auth $realm is in a form of a subrealm, e.g. api_admin_http
  api_admin_jwt, etc. where for bans check it's 'admin' realm.
  Therefore, user_is_banned() is now called from there using explicit
  'admin' realm as the argument.

Change-Id: I3a10a9b492bf9dbe83ddd34a8851e83b23f90587
(cherry picked from commit a3945269fc)
(cherry picked from commit afb2dba6d5)
mr12.5.1
Kirill Solomko 2 years ago
parent b675a4ba75
commit cacb6d6c4a

@ -57,7 +57,7 @@ sub perform_auth {
my $res;
return $res if !check_password($pass);
return $res if user_is_banned($c, $user, $realm);
return $res if user_is_banned($c, $user, 'admin');
my $dbadmin;
$dbadmin = $c->model('DB')->resultset('admins')->find({

Loading…
Cancel
Save