mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 02:23:44 +08:00
18 lines
333 B
Ruby
18 lines
333 B
Ruby
class Admin::AdminController < ApplicationController
|
|
|
|
before_filter :ensure_logged_in
|
|
before_filter :ensure_staff
|
|
|
|
def index
|
|
render nothing: true
|
|
end
|
|
|
|
protected
|
|
|
|
# this is not really necessary cause the routes are secure
|
|
def ensure_staff
|
|
raise Discourse::InvalidAccess.new unless current_user.staff?
|
|
end
|
|
|
|
end
|