mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:59:39 +08:00
21 lines
429 B
Ruby
21 lines
429 B
Ruby
# EXPERIMENTAL: front end for upgrading your instance using the web UI
|
|
|
|
class Admin::UpgradeController < Admin::AdminController
|
|
|
|
before_filter :ensure_admin
|
|
skip_before_filter :check_xhr
|
|
|
|
layout 'no_js'
|
|
|
|
def index
|
|
require_dependency 'upgrade/git_repo'
|
|
@main_repo = Upgrade::GitRepo.new(Rails.root)
|
|
end
|
|
|
|
protected
|
|
|
|
def ensure_admin
|
|
raise Discourse::InvalidAccess.new unless current_user.admin?
|
|
end
|
|
end
|