2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-06 10:50:21 +08:00

FIX: hide restricted profile info from TL0 users to anonymous in 'JS-off' page

This commit is contained in:
Régis Hanol 2014-11-27 19:51:13 +01:00
parent 65c106325c
commit 07211489f0
4 changed files with 18 additions and 5 deletions

View file

@ -30,6 +30,7 @@ class UsersController < ApplicationController
user_serializer = UserSerializer.new(@user, scope: guardian, root: 'user')
respond_to do |format|
format.html do
@restrict_fields = guardian.restrict_user_fields?(@user)
store_preloaded("user_#{@user.username}", MultiJson.dump(user_serializer))
end