From 1543c8d0d88c0611d732bb18fb083caf44650a6c Mon Sep 17 00:00:00 2001 From: Julien Legros Date: Tue, 13 Mar 2018 15:01:58 +0100 Subject: [PATCH] [FIX] runbot: allow rebuild and kill --- runbot/controllers/frontend.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runbot/controllers/frontend.py b/runbot/controllers/frontend.py index 324fe8f8..e5f8360a 100644 --- a/runbot/controllers/frontend.py +++ b/runbot/controllers/frontend.py @@ -139,13 +139,13 @@ class Runbot(http.Controller): @http.route(['/runbot/build//kill'], type='http', auth="user", methods=['POST'], csrf=False) def build_ask_kill(self, build_id, search=None, **post): - build = request.env['runbot.build'].browse(build_id) + build = request.env['runbot.build'].sudo().browse(build_id) build._ask_kill() return werkzeug.utils.redirect('/runbot/repo/%s' % build.repo_id.id + ('?search=%s' % search if search else '')) @http.route(['/runbot/build//force'], type='http', auth="public", methods=['POST'], csrf=False) def build_force(self, build_id, search=None, **post): - build = request.env['runbot.build'].browse(build_id) + build = request.env['runbot.build'].sudo().browse(build_id) build._force() return werkzeug.utils.redirect('/runbot/repo/%s' % build.repo_id.id + ('?search=%s' % search if search else ''))