mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
Initial release of Discourse
This commit is contained in:
16
app/controllers/admin/admin_controller.rb
Normal file
16
app/controllers/admin/admin_controller.rb
Normal file
@ -0,0 +1,16 @@
|
||||
class Admin::AdminController < ApplicationController
|
||||
|
||||
before_filter :ensure_logged_in
|
||||
before_filter :ensure_is_admin
|
||||
|
||||
def index
|
||||
render nothing: true
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def ensure_is_admin
|
||||
raise Discourse::InvalidAccess.new unless current_user.admin?
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user