made contributor badge changable via web interface
This commit is contained in:
parent
e671990a36
commit
ced880fe34
|
@ -118,7 +118,7 @@ class Ajax::ModerationController < ApplicationController
|
||||||
target_user = User.find_by_screen_name(params[:user])
|
target_user = User.find_by_screen_name(params[:user])
|
||||||
|
|
||||||
@message = "nope!"
|
@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
|
if (%w(supporter moderator admin).include?(params[:type].downcase) and !current_user.admin?) or
|
||||||
(params[:type].downcase == 'banned' and target_user.admin?)
|
(params[:type].downcase == 'banned' and target_user.admin?)
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
- unless @user.admin?
|
- 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: '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: '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?
|
- 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: '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: 'moderator', description: 'Someone trustworthy enough to help managing reports',user: @user
|
||||||
|
|
Loading…
Reference in New Issue