1
0
mirror of https://github.com/quay/quay.git synced 2025-07-11 06:41:51 +03:00

Stop relying on GitHub's admin permissions for a repository (#285)

It appears GitHub has narrowed the permissions returned, so while we
might still have the ability to admin the *repo*, the permissions
list is returning `false`, so we disallow people to create triggers,
which is wrong.

Fixes https://issues.redhat.com/browse/PROJQUAY-523
This commit is contained in:
Joseph Schorr
2020-03-26 14:08:10 -04:00
committed by GitHub
parent 258a7dc199
commit d59cdafdde
2 changed files with 10 additions and 2 deletions

View File

@ -312,7 +312,7 @@ class GithubBuildTrigger(BuildTriggerHandler):
"description": repo.description or "",
"last_updated": timegm(repo.pushed_at.utctimetuple()) if repo.pushed_at else 0,
"url": repo.html_url,
"has_admin_permissions": repo.permissions.admin,
"has_admin_permissions": True,
"private": repo.private,
}