mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: display custom sections with default theme
also cleans up mechanism for previewing themes, cleans up naming, gets rid of old janky "preview_style", secures local theme key
This commit is contained in:
@@ -297,6 +297,14 @@ class Guardian
|
||||
UserExport.where(user_id: @user.id, created_at: (Time.zone.now.beginning_of_day..Time.zone.now.end_of_day)).count == 0
|
||||
end
|
||||
|
||||
def allow_theme?(theme_key)
|
||||
if is_staff?
|
||||
Theme.theme_keys.include?(theme_key)
|
||||
else
|
||||
Theme.theme_user_keys.include?(theme_key)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
|
||||
Reference in New Issue
Block a user