-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[8381] add option to allow unregistered users to vote in polls #1683
Conversation
e9de720
to
10badee
Compare
) > 0 | ||
return False | ||
|
||
def update(self, instance, data): | ||
instance.allow_unregistered_users = data.get("allow_unregistered_users", False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about the update
of the PollViewSet? shouldn't it have a check whether allow_unregistered_users
is true? It inherits from the rest framework mixins, so it may need to be overwritten.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean to check whether a unregistered user trying to vote is allowed to do that ? That's done by the rules/predicates already.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments for the django part, but need to do a local test too.
@hom3mad3 can you look more closely to the react part?
BTW can we have the makefile and the github workflows in a separate PR?
I'll make extra PRs but we will have to merge the workflow before this then and rebase it |
@goapunk tried to test it locally, but we cannot set the |
@m4ra it works for me, the checkbox is there (in the |
9c27b71
to
818a105
Compare
847551b
to
4011c8b
Compare
4011c8b
to
d623776
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
Tasks