From 9024594df280c4e734395fe941bf41ad84bbcef7 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Fri, 24 Mar 2023 17:06:29 +0100 Subject: [PATCH] [FIX] runbot: use request instead of self --- runbot/controllers/frontend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runbot/controllers/frontend.py b/runbot/controllers/frontend.py index b35a407b..f6226095 100644 --- a/runbot/controllers/frontend.py +++ b/runbot/controllers/frontend.py @@ -210,7 +210,7 @@ class Runbot(Controller): '/runbot/bundle//force/', ], type='http', auth="user", methods=['GET', 'POST'], csrf=False) def force_bundle(self, bundle, auto_rebase=False, **_post): - if not self.env.user.has_group('runbot.group_runbot_advanced_user'): + if not request.env.user.has_group('runbot.group_runbot_advanced_user'): raise Forbidden("Only users with a specific group can do that. Please contact runbot administrators") _logger.info('user %s forcing bundle %s', request.env.user.name, bundle.name) # user must be able to read bundle batch = bundle.sudo()._force()