mirror of
https://github.com/lukevella/rallly.git
synced 2025-06-07 13:11:49 +02:00
✨ Allow users to customize poll behaviour (#785)
This commit is contained in:
parent
14cfa2bd50
commit
b1e3f63a2e
58 changed files with 1361 additions and 1042 deletions
|
@ -25,7 +25,6 @@ export const usePermissions = () => {
|
|||
if (isClosed) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (role === "admin" && user.id === poll.userId) {
|
||||
return true;
|
||||
}
|
||||
|
@ -37,7 +36,7 @@ export const usePermissions = () => {
|
|||
if (
|
||||
participant &&
|
||||
(participant.userId === user.id ||
|
||||
participant.userId === context.userId)
|
||||
(context.userId && participant.userId === context.userId))
|
||||
) {
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue