diff --git a/app/controllers/ajax/moderation_controller.rb b/app/controllers/ajax/moderation_controller.rb index 2a635651..12580420 100644 --- a/app/controllers/ajax/moderation_controller.rb +++ b/app/controllers/ajax/moderation_controller.rb @@ -118,7 +118,7 @@ class Ajax::ModerationController < ApplicationController target_user = User.find_by_screen_name(params[:user]) @message = "nope!" - return unless %w(banned blogger supporter moderator admin).include? params[:type].downcase + return unless %w(banned blogger supporter moderator admin contributor).include? params[:type].downcase if (%w(supporter moderator admin).include?(params[:type].downcase) and !current_user.admin?) or (params[:type].downcase == 'banned' and target_user.admin?) diff --git a/app/views/user/_modal_privileges.html.haml b/app/views/user/_modal_privileges.html.haml index 9e1a041b..3edbb981 100644 --- a/app/views/user/_modal_privileges.html.haml +++ b/app/views/user/_modal_privileges.html.haml @@ -14,9 +14,10 @@ - unless @user.admin? = render 'user/modal_privileges_item', privilege: 'banned', description: 'Hit the user with ye olde banhammer', user: @user = render 'user/modal_privileges_item', privilege: 'blogger', description: 'The user gets that privilege if they blogged something (nice) about Retrospring.', user: @user + = render 'user/modal_privileges_item', privilege: 'contributor', description: "This user has contributed to justask#{" (the software behind #{APP_CONFIG['site_name']})" unless APP_CONFIG['site_name'] == 'justask'}.", user: @user - if current_user.admin? = render 'user/modal_privileges_item', privilege: 'supporter', description: 'This user monetarily supports the site', user: @user = render 'user/modal_privileges_item', privilege: 'moderator', description: 'Someone trustworthy enough to help managing reports',user: @user = render 'user/modal_privileges_item', privilege: 'admin', description: 'This user is part of the core team', user: @user .modal-footer - %button.btn.btn-primary{name: 'checked-privileges', type: :button, data: { dismiss: :modal }} Done \ No newline at end of file + %button.btn.btn-primary{name: 'checked-privileges', type: :button, data: { dismiss: :modal }} Done