forked from External/greenlight
Reduce number of roles queries for the admin controller (#631)
This commit is contained in:
committed by
farhatahmad
parent
5a3ad3159c
commit
8c63f793a5
@ -106,7 +106,7 @@ module ApplicationHelper
|
||||
# Returns the page that the logo redirects to when clicked on
|
||||
def home_page
|
||||
return root_path unless current_user
|
||||
return admins_path if current_user.has_role? :super_admin
|
||||
return admins_path if current_user.has_cached_role? :super_admin
|
||||
current_user.main_room
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user