mirror of
https://github.com/odoo/runbot.git
synced 2025-03-15 15:35:46 +07:00
[IMP] runbot_merge: log ACL error in PR controller
Currently this just silently returns a 404. Since repos are gated by default (only accessible to internal users) this can get very confusing when trying to setup a new repo or when forgetting this information when writing tests.
This commit is contained in:
parent
2ab06ca96b
commit
d2e730c39b
@ -7,6 +7,7 @@ import colorsys
|
||||
import hashlib
|
||||
import io
|
||||
import json
|
||||
import logging
|
||||
import math
|
||||
import pathlib
|
||||
from email.utils import formatdate
|
||||
@ -22,6 +23,9 @@ from PIL import Image, ImageDraw, ImageFont
|
||||
from odoo.http import Controller, route, request
|
||||
from odoo.tools import file_open
|
||||
|
||||
|
||||
_logger = logging.getLogger(__name__)
|
||||
|
||||
LIMIT = 20
|
||||
class MergebotDashboard(Controller):
|
||||
@route('/runbot_merge', auth="public", type="http", website=True, sitemap=True)
|
||||
@ -101,6 +105,12 @@ class MergebotDashboard(Controller):
|
||||
if not pr_id:
|
||||
raise werkzeug.exceptions.NotFound()
|
||||
if not pr_id.repository.group_id <= request.env.user.groups_id:
|
||||
_logger.warning(
|
||||
"Access error: %s (%s) tried to access %s but lacks access",
|
||||
request.env.user.login,
|
||||
request.env.user.name,
|
||||
pr_id.display_name,
|
||||
)
|
||||
raise werkzeug.exceptions.NotFound()
|
||||
|
||||
if png:
|
||||
|
Loading…
Reference in New Issue
Block a user