diff --git a/common/globalConfig.ts b/common/globalConfig.ts new file mode 100644 index 00000000..fc3e25e7 --- /dev/null +++ b/common/globalConfig.ts @@ -0,0 +1,3 @@ +export type GlobalConfig = { + pinnedItems: { itemId: string; type: 'post' | 'contract' }[] +} diff --git a/firestore.rules b/firestore.rules index 993791b2..0a0ecfe0 100644 --- a/firestore.rules +++ b/firestore.rules @@ -23,6 +23,12 @@ service cloud.firestore { allow read; } + match /globalConfig/globalConfig { + allow read; + allow update: if isAdmin() + allow create: if isAdmin() + } + match /users/{userId} { allow read; allow update: if userId == request.auth.uid diff --git a/web/components/groups/group-overview.tsx b/web/components/groups/group-overview.tsx index d5cdaafa..c5a7a46a 100644 --- a/web/components/groups/group-overview.tsx +++ b/web/components/groups/group-overview.tsx @@ -231,7 +231,6 @@ export function PinnedItems(props: { return pinned.length > 0 || isEditable ? (
- {isEditable && (