Fix #3842: Mods can demote other mods or admins.

This commit is contained in:
evazion
2018-08-25 13:52:50 -05:00
parent 0bb787d987
commit 3dafca9aec
7 changed files with 1 additions and 111 deletions

View File

@@ -150,7 +150,7 @@ module ApplicationHelper
html << " [" + link_to("+", new_user_feedback_path(:user_feedback => {:category => "positive", :user_id => user.id})) + "]"
unless user.is_gold?
html << " [" + link_to("invite", new_moderator_invitation_path(:invitation => {:name => user.name, :can_upload_free => "1"})) + "]"
html << " [" + link_to("promote", edit_admin_user_path(user)) + "]"
end
else
html << " [" + link_to("&ndash;".html_safe, new_user_feedback_path(:user_feedback => {:category => "negative", :user_id => user.id})) + "]"

View File

@@ -1,10 +0,0 @@
module Moderator
module InvitationsHelper
def level_select
choices = []
choices << ["Gold", User::Levels::GOLD]
choices << ["Platinum", User::Levels::PLATINUM]
select(:invitation, :level, choices)
end
end
end