🐛 Allow admin to delete any comment (#715)

This commit is contained in:
Luke Vella 2023-06-28 15:51:00 +01:00 committed by GitHub
parent f65934216c
commit d8b4e86a90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 3 deletions

View file

@ -19,6 +19,7 @@ export const usePermissions = () => {
const { participants } = useParticipants();
const isClosed = poll.closed === true || poll.event !== null;
return {
isUser: (userId: string) => userId === user.id || userId === context.userId,
canAddNewParticipant: !isClosed,
canEditParticipant: (participantId: string) => {
if (isClosed) {