Add board share management UI
This commit is contained in:
1 parent
b429e7b24d
commit
c4226bc63d
30 files changed
+565
-56
No files matched your search
@@ -15,6 +15,10 @@ export async function canViewEntity({ user }: Auth, entityId: string) {
|
||||
|
||||
const entity = await getEntity(entityId);
|
||||
|
||||
if (!entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity.userId) {
|
||||
return user.id === entity.userId;
|
||||
}
|
||||
@@ -39,6 +43,10 @@ export async function canUpdateEntity({ user }: Auth, entityId: string) {
|
||||
|
||||
const entity = await getEntity(entityId);
|
||||
|
||||
if (!entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity.userId) {
|
||||
return user.id === entity.userId;
|
||||
}
|
||||
@@ -63,6 +71,10 @@ export async function canDeleteEntity({ user }: Auth, entityId: string) {
|
||||
|
||||
const entity = await getEntity(entityId);
|
||||
|
||||
if (!entity) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (entity.userId) {
|
||||
return user.id === entity.userId;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user