管理员运营人员

chromesetting
daiao 5 years ago
parent 303f5e4d37
commit addba1de12

@ -50,7 +50,7 @@ class CommentsController < ApplicationController
# 隐藏、取消隐藏
def hidden
if @hack.manager?(current_user)
if current_user.admin_or_business?
@discuss = @hack.discusses.where(id: params[:id]).first
@discuss.update_attribute(:hidden, params[:hidden] == "1")
sucess_status

@ -16,5 +16,6 @@ end
json.user do
json.partial! 'users/user', user: current_user
json.hack_manager @hack.manager?(current_user)
json.admin current_user.admin_or_business?
end
Loading…
Cancel
Save