FIX: Only block local edits for git-sourced themes (#11450)

Themes uploaded as zip files are given a row in the `remote_themes` table to store metadata, even though they are not truly remote.
This commit is contained in:
David Taylor
2020-12-09 19:41:42 +00:00
committed by GitHub
parent 0116897ac9
commit d1d37473d4
4 changed files with 20 additions and 4 deletions

View File

@ -291,7 +291,7 @@ class Admin::ThemesController < Admin::AdminController
end
def ban_for_remote_theme!
raise Discourse::InvalidAccess if @theme.remote_theme
raise Discourse::InvalidAccess if @theme.remote_theme&.is_git?
end
def add_relative_themes!(kind, ids)