5
0
mirror of https://github.com/odoo/runbot.git synced 2025-03-16 16:05:42 +07:00

[IMP] runbot: alow autorebase for external pr

This commit is contained in:
Xavier-Do 2024-04-02 11:57:47 +02:00
parent 9c4983f5b7
commit 70f4fe23a5

View File

@ -224,7 +224,7 @@ class Runbot(Controller):
'/runbot/bundle/<model("runbot.bundle"):bundle>/force/<int:auto_rebase>',
], type='http', auth="user", methods=['GET', 'POST'], csrf=False)
def force_bundle(self, bundle, auto_rebase=False, **_post):
if not request.env.user.has_group('runbot.group_runbot_advanced_user'):
if not request.env.user.has_group('runbot.group_runbot_advanced_user') and ':' not in bundle.name:
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()