mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:01:18 +08:00
SECURITY: moderator shouldn't be able to import a theme via API (#18418)
* SECURITY: moderator shouldn't be able to import a theme via API. * DEV: apply `AdminConstraint` for all the "themes" routes. Co-authored-by: Vinoth Kannan <svkn.87@gmail.com>
This commit is contained in:
@ -5,6 +5,7 @@ require 'base64'
|
||||
class Admin::ThemesController < Admin::AdminController
|
||||
|
||||
skip_before_action :check_xhr, only: [:show, :preview, :export]
|
||||
before_action :ensure_admin
|
||||
|
||||
def preview
|
||||
theme = Theme.find_by(id: params[:id])
|
||||
|
Reference in New Issue
Block a user