-
Notifications
You must be signed in to change notification settings - Fork 33
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
[TAN-3658] Add new not_reactable_status_code reason to deny reacting_idea #10197
base: master
Are you sure you want to change the base?
[TAN-3658] Add new not_reactable_status_code reason to deny reacting_idea #10197
Conversation
|
@jinjagit You can revert the FE changes in this PR. I'll open a separate PR. |
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.
Looks generally good. It's not necessarily an issue but the fact that the number of queries has gone from 3 to 8 maybe warrants looking at some more
back/spec/services/permissions/idea_permissions_service_spec.rb
Outdated
Show resolved
Hide resolved
Done. Thanks! |
back/app/models/idea_status.rb
Outdated
@@ -19,6 +19,7 @@ class IdeaStatus < ApplicationRecord | |||
CODES = %w[prescreening proposed threshold_reached expired viewed under_consideration accepted implemented rejected answered ineligible custom].freeze | |||
LOCKED_CODES = %w[prescreening proposed threshold_reached expired].freeze | |||
MANUAL_TRANSITION_NOT_ALLOWED_CODES = %w[prescreening threshold_reached expired].freeze | |||
REACTING_NOT_ALLOWED_CODES = %w[expired ineligible].freeze |
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.
Should we include prescreening
?
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've added it in, but it might be YAGNI as an idea with a prescreening status can't have a publication_status: 'published'
, so it's unlikely anyone (other than admins, mods & author) can see the idea to vote on it.
…into TAN-3658-prevent-voting-on-proposal-with-specific-status-codes
…s-codes' of https://github.com/CitizenLabDotCo/citizenlab into TAN-3658-prevent-voting-on-proposal-with-specific-status-codes
BE code only, at this point.
Changelog
Technical
not_reactable_status_code
reason to denyreacting_idea
. To be used to prevent voting on a proposal with prescreening, expired or ineligible status (including in mobile view)