[FIX] runbot: hide wakeup action from public users

The initial idea to have a wakeup for public users stopped being viable
due to some abuse of the system, maybe unintentional crawling of
some build page but still, this feature will now be limited to internal
users only.
This commit is contained in:
Xavier-Do 2023-05-02 13:32:43 +02:00
parent 6bc6dd77ab
commit 04760491a2
2 changed files with 2 additions and 2 deletions

View File

@ -269,7 +269,7 @@ class Runbot(Controller):
@o_route([
'/runbot/build/<int:build_id>/<operation>',
], type='http', auth="public", methods=['POST'], csrf=False)
], type='http', auth="user", methods=['POST'], csrf=False)
def build_operations(self, build_id, operation, **post):
build = request.env['runbot.build'].sudo().browse(build_id)
if operation == 'rebuild':

View File

@ -219,7 +219,7 @@
<a t-if="bu.static_run" t-att-href="bu.static_run" class="btn btn-info" title="View result" aria-label="View result">
<i class="fa fa-sign-in"/>
</a>
<a t-if="bu.local_state=='done' and bu.requested_action != 'wake_up' and bu.database_ids" href="#" data-runbot="wakeup" t-att-data-runbot-build="bu.id" class="btn btn-default" title="Wake up this build" aria-label="Wake up this build">
<a groups="base.group_user" t-if="bu.local_state=='done' and bu.requested_action != 'wake_up' and bu.database_ids" href="#" data-runbot="wakeup" t-att-data-runbot-build="bu.id" class="btn btn-default" title="Wake up this build" aria-label="Wake up this build">
<i class="fa fa-coffee"/>
</a>
<a t-attf-href="/runbot/build/{{bu['id']}}" class="btn btn-default" title="Build details" aria-label="Build details">