You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

15 lines
334 B

module Api
module V1
module Admin
class BaseController < Api::V1::BaseController
before_action :require_admin!
private
def require_admin!
render json: { error: "Keine Administratorberechtigung" }, status: :forbidden unless current_user.is_admin?
end
end
end
end
end