mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot: always display autorebase for external pr
This commit is contained in:
parent
70532df2d6
commit
4f0094ea70
@ -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()
|
||||
|
@ -17,7 +17,7 @@
|
||||
<a groups="runbot.group_runbot_advanced_user" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force" title="Force A New Batch">
|
||||
<i class="fa fa-refresh"/>
|
||||
</a>
|
||||
<a groups="runbot.group_runbot_advanced_user" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force/1" title="Force A New Batch with automatic rebase">
|
||||
<a t-if="bundle.env.user.has_group('runbot.group_runbot_advanced_user') or (bundle.env.user.has_group('runbot.group_user') and ':' in bundle.name)" class="btn btn-default" t-attf-href="/runbot/bundle/{{bundle.id}}/force/1" title="Force A New Batch with automatic rebase">
|
||||
<i class="fa fa-fast-forward"/>
|
||||
</a>
|
||||
<t t-call="runbot.branch_copy_button"/>
|
||||
|
Loading…
Reference in New Issue
Block a user