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
FIX: don't allow category and tag tracking settings on staged users #13688
Conversation
Configuring staged users to watch categories and tags is a way to sign them up to get many emails. These emails may be unwanted and get marked as spam, hurting the site's email deliverability. Users can opt-in to email notifications by logging on to their account and configuring their own preferences. If staff need to be able to configure these preferences on behalf of staged users, the "allow changing staged user tracking" site setting can be enabled. Default is to not allow it.
@@ -30,6 +30,7 @@ def staff_attributes(*attrs) | |||
can_change_bio | |||
can_change_location | |||
can_change_website | |||
can_change_tracking_preferences |
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 don't think we should include this in the user web hook yet as this is doesn't really provide any benefit for the webhook.
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.
Actually this code was removing it from the serializer. It is excluding attrs from the base serializer. I'll put it back.
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 suggestions but in general the PR looks good to me.
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
Co-authored-by: Alan Guo Xiang Tan <gxtan1990@gmail.com>
canChangeCategoryPreferences: readOnly( | ||
"model.can_change_tracking_preferences" | ||
), | ||
canChangeTagPreferences: and( |
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.
Minor but if you are only using this in a template you can use the (and
helper now which will eliminate some code.
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 was aware that was possible, but couldn't find an example of it. TIL it's (and
.
Configuring staged users to watch categories and tags is a way to sign
them up to get many emails. These emails may be unwanted and get marked
as spam, hurting the site's email deliverability.
Users can opt-in to email notifications by logging on to their
account and configuring their own preferences.
If staff need to be able to configure these preferences on behalf of
staged users, the "allow changing staged user tracking" site setting
can be enabled. Default is to not allow it.