-
Notifications
You must be signed in to change notification settings - Fork 0
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
Email verification #311
Email verification #311
Conversation
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.
Changes make sense to me.
I did have a quick question on requirements of of_posting_age?
and whether we still want this moving forward. Not blocking, just wondering.
@@ -11,18 +11,18 @@ def show? | |||
|
|||
def create? | |||
if Array.wrap(record).compact.any? { |c| c.discussion.board.section == 'zooniverse' } | |||
logged_in? && !locked? && writable? && of_posting_age? |
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.
Do we still want the of_posting_age?
restriction now that we have confirmed?
@@ -11,9 +11,9 @@ def show? | |||
|
|||
def create? | |||
if Array.wrap(record).compact.any? { |d| d.board.section == 'zooniverse' } | |||
writable? && of_posting_age? | |||
writable? && confirmed? && of_posting_age? |
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.
Do we still want the of_posting_age? restriction now that we have confirmed?
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.
Leaving this here because we can turn it off via deploy instead of removing the code.
Adds support for the Panoptes user table attribute
confirmed_at
; a not-nullconfirmed_at
attr indicates that the user has confirmed their email address. Includes checks of this attribute on all boards for the following action policies:Discussions: create
Comments: create, update, destroy
Conversations: index, show, create, destroy
Messages: index, show, create
This seems to follow the intentions of both the initial policies and the new restrictions. This could have been done at a higher level (closer to the application controller) where entire verbs would be blocked similarly to how bans are handled. However, this lacks the finer grain control of policies and introduces considerably more complexity in testing. This feels like a good compromise and is similar to how the account age requirement for posting was handled.
This PR requires the corresponding Panoptes PR to merge first. The couple of them will need some hands on testing on staging.