mirror of
https://github.com/odoo/runbot.git
synced 2025-03-27 05:15:45 +07:00
[IMP] runbot: alow autorebase for external pr
This commit is contained in:
parent
9c4983f5b7
commit
70f4fe23a5
@ -224,7 +224,7 @@ class Runbot(Controller):
|
|||||||
'/runbot/bundle/<model("runbot.bundle"):bundle>/force/<int:auto_rebase>',
|
'/runbot/bundle/<model("runbot.bundle"):bundle>/force/<int:auto_rebase>',
|
||||||
], type='http', auth="user", methods=['GET', 'POST'], csrf=False)
|
], type='http', auth="user", methods=['GET', 'POST'], csrf=False)
|
||||||
def force_bundle(self, bundle, auto_rebase=False, **_post):
|
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")
|
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
|
_logger.info('user %s forcing bundle %s', request.env.user.name, bundle.name) # user must be able to read bundle
|
||||||
batch = bundle.sudo()._force()
|
batch = bundle.sudo()._force()
|
||||||
|
Loading…
Reference in New Issue
Block a user