[IMP] runbot: fail before contacting github if user cannot write on team

This commit is contained in:
Xavier-Do 2023-01-13 12:04:02 +01:00 committed by Christophe Monniez
parent cd4c6b5e43
commit 6892546d94

View File

@ -92,6 +92,8 @@ class RunbotTeam(models.Model):
return team_loggins
def _fetch_members(self):
self.check_access_rights('write')
self.check_access_rule('write')
for team in self:
if team.github_team:
url = f"https://api.github.com/orgs/{team.organisation}/teams/{team.github_team}"