Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
🐛 Fix issue where votes can be submitted even when paused (#1757)
Luke Vellaa748f46c3e50
diff --git a/apps/web/src/contexts/permissions.tsx b/apps/web/src/contexts/permissions.tsxindex db6f51599..505cad0a2 100644--- a/apps/web/src/contexts/permissions.tsx+++ b/apps/web/src/contexts/permissions.tsx@@ -29,12 +29,11 @@ export const usePermissions = () => {const { user, ownsObject } = useUser();const role = useRole();const { participants } = useParticipants();- const isClosed = poll.event !== null;return {isUser: (userId: string) => userId === user.id || userId === context.userId,- canAddNewParticipant: !isClosed,+ canAddNewParticipant: poll.status === "live",canEditParticipant: (participantId: string) => {- if (isClosed) {+ if (poll.status !== "live") {return false;}