mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:41:12 +08:00
FEATURE: Allow the user to select a custom home page (#5268)
* Add user_home configuration option * Use the new user_home preference to actually show the right home page * Fix trailing whitespace * Update user_option_serializer.rb * Fix JavaScript default homepage tests * Use an object instead of a giant switch * Remove trailing whitespace * Make the default `user_home` set to `null` instead of `0` * Rename user_home to homepage_id
This commit is contained in:
@ -308,7 +308,7 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
def current_homepage
|
||||
current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
|
||||
current_user&.user_option&.homepage || SiteSetting.anonymous_homepage
|
||||
end
|
||||
|
||||
def serialize_data(obj, serializer, opts = nil)
|
||||
|
Reference in New Issue
Block a user