Skip to content

Commit

Permalink
fix: private projects early exit when not root viewer (#5232)
Browse files Browse the repository at this point in the history
  • Loading branch information
sjaanus committed Oct 31, 2023
1 parent a220b8e commit 406b238
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/features/private-project/privateProjectStore.ts
Expand Up @@ -40,9 +40,9 @@ class PrivateProjectStore implements IPrivateProjectStore {
'roles.type': 'root',
})
.count('*')
.first();
.then((res) => Number(res[0].count));

if (!isViewer || isViewer.count === 0) {
if (isViewer === 0) {
return ALL_PROJECT_ACCESS;
}

Expand Down

0 comments on commit 406b238

Please sign in to comment.