Fix repo access (#476) (#477)

Backport #476

* fix repo access

* fix permission syncing

Co-authored-by: Anbraten <anton@ju60.de>
This commit is contained in:
6543
2021-10-26 23:27:05 +02:00
committed by GitHub
parent f585b23811
commit 3af5f99fb2
18 changed files with 276 additions and 13 deletions

View File

@@ -28,6 +28,7 @@ FROM repos LEFT OUTER JOIN builds ON build_id = (
)
INNER JOIN perms ON perms.perm_repo_id = repos.repo_id
WHERE perms.perm_user_id = ?
AND (perms.perm_push = 1 OR perms.perm_admin = 1)
AND repos.repo_active = 1
ORDER BY repo_full_name ASC;
@@ -57,5 +58,6 @@ FROM repos
INNER JOIN perms ON perms.perm_repo_id = repos.repo_id
INNER JOIN builds ON builds.build_repo_id = repos.repo_id
WHERE perms.perm_user_id = ?
AND (perms.perm_push = 1 OR perms.perm_admin = 1)
ORDER BY build_id DESC
LIMIT 50