Skip to content
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

MBS-9372: Allow notes from voting-disabled editor #524

Merged
merged 1 commit into from Jun 12, 2017

Conversation

yvanzo
Copy link
Contributor

@yvanzo yvanzo commented Jun 11, 2017

Fix bug MBS-9372: Revoking editing/voting editor rights also renders them unable to write edit notes.

Prior to this patch, if admin revoked editing/voting privileges of any editor, this editor would not be able to submit edit notes, since it would be incidentally disallowed at the same time as votes.

This patch refines permissions to submit edit notes and votes so to allow submitting edit notes when editor is editing/voting-disabled and no vote is submitted. If any vote is submitted at the same time, edit notes are rejected as well and an error page is returned.

@@ -0,0 +1,8 @@
[% WRAPPER 'layout.tt' full_width=1 title=l('Error Voting Edit') %]
<h1>[% l('Error Voting Edit') %]</h1>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Error Voting on Edits" sounds more correct to me.

[% WRAPPER 'layout.tt' full_width=1 title=l('Error Voting Edit') %]
<h1>[% l('Error Voting Edit') %]</h1>
<p>
[% l('You’re currently not allowed to vote because an admin has revoked your privileges.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we use the same message that's in root/layout.tt? I guess the only difference is s/vote/edit or vote/. But that seems perfectly fine and then won't have to be translated again.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A macro for this <p> might be even better.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, the message is actually displayed twice. I simplified the message instead in 03f2172

Prior to this patch, if admin revoked editing/voting privileges of
any editor, this editor would not be able to submit edit notes,
since it would be incidentally disallowed at the same time as votes.

This patch refines permissions to submit edit notes and votes so to
allow submitting edit notes when editor is editing/voting-disabled
and no vote is submitted.  If any vote is submitted at the same
time, edit notes are rejected as well and an error page is returned.
@yvanzo
Copy link
Contributor Author

yvanzo commented Jun 12, 2017

Fixed up.

@mwiencek mwiencek merged commit ac0dfd4 into metabrainz:master Jun 12, 2017
@yvanzo yvanzo deleted the mbs-9372 branch July 26, 2018 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants