1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

fix: private projects early exit when not root viewer (#5232)

This commit is contained in:
Jaanus Sellin 2023-10-31 13:37:09 +02:00 committed by GitHub
parent a220b8e518
commit 406b2383da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -40,9 +40,9 @@ class PrivateProjectStore implements IPrivateProjectStore {
'roles.type': 'root', 'roles.type': 'root',
}) })
.count('*') .count('*')
.first(); .then((res) => Number(res[0].count));
if (!isViewer || isViewer.count === 0) { if (isViewer === 0) {
return ALL_PROJECT_ACCESS; return ALL_PROJECT_ACCESS;
} }