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
add a field for users to display whether or not they allow article edits #1799
Conversation
| @@ -0,0 +1,5 @@ | |||
| class AddAllowsArticleEditsToUsers < ActiveRecord::Migration[5.1] | |||
| def change | |||
| add_column :users, :allows_article_edits, :boolean, default: 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.
I think we actually want this to default to true
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.
Cool, that makes sense!
app/views/users/_profile.html.erb
Outdated
| @@ -45,7 +45,10 @@ | |||
| </span> | |||
| <% end %> | |||
| </div> | |||
|
|
|||
| <div class="field checkbox-label-first"> | |||
| <%= f.label :allows_article_edits, "Allow admins to edit typos in my articles" %> | |||
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 think this should be "Allow admins to edit typos or adjust formatting in my articles." Wanted to add the formatting part because sometimes we adjust markdown errors.
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.
totally -- will add
| @@ -48,7 +48,8 @@ def moderation_routes? | |||
| end | |||
|
|
|||
| def permitted_attributes | |||
| %i[available_for | |||
| %i[allows_article_edits | |||
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 think this might make more sense under /settings/misc.
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.
that makes sense!
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 good! Should be good to merge once the merge conflict is resolved.
|
I think it should be resolved! |
What type of PR is this? (check all applicable)
Description
Adds a flag to profiles so users can state whether they want admins to be able to fix typos and such.
Related Tickets & Documents
#1539
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
Added to documentation?
[optional] What gif best describes this PR or how it makes you feel?