This commit is contained in:
Timothy Jaeryang Baek committed 2026-03-23 23:39:52 -05:00
1 parent 3a4b862e81
commit 139e764b2f
45 files changed
+6251 -5730

No files matched your search

@@ -163,7 +163,9 @@
const hasPublicWriteGrant = (grants: AccessGrant[]): boolean =>
grants.some(
(grant) =>
grant.principal_type === 'user' && grant.principal_id === '*' && grant.permission === 'write'
grant.principal_type === 'user' &&
grant.principal_id === '*' &&
grant.permission === 'write'
);
const currentGrants = (): AccessGrant[] =>
@@ -203,11 +205,7 @@
const setPublic = (isPublic: boolean) => {
// Remove all user:* grants
const filtered = currentGrants().filter(
(grant) =>
!(
grant.principal_type === 'user' &&
grant.principal_id === '*'
)
(grant) => !(grant.principal_type === 'user' && grant.principal_id === '*')
);
if (isPublic) {
filtered.push({