From a3945269fcef39020027873e239194648b625e8b Mon Sep 17 00:00:00 2001 From: Kirill Solomko Date: Fri, 6 Sep 2024 16:32:37 +0200 Subject: [PATCH] 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 --- lib/NGCP/Panel/Utils/Auth.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/NGCP/Panel/Utils/Auth.pm b/lib/NGCP/Panel/Utils/Auth.pm index 278a4d21eb..ce72eae023 100644 --- a/lib/NGCP/Panel/Utils/Auth.pm +++ b/lib/NGCP/Panel/Utils/Auth.pm @@ -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({