Sha256: 8212b5226f0eec98b12cd815da4331791d7e72f2514d2c0b1b1ddfea7e037f06

Contents?: true

Size: 482 Bytes

Versions: 15

Compression:

Stored size: 482 Bytes

Contents

require_dependency "mongoid_forums/application_controller"

module MongoidForums
  class Admin::BaseController < ApplicationController
    before_filter :authenticate_mongoid_forums_admin

    def index
    end

    def authenticate_mongoid_forums_admin
      if !mongoid_forums_user || !mongoid_forums_user.mongoid_forums_admin?
        flash.alert = t("mongoid_forums.errors.access_denied")
        redirect_to forums_path #TODO: Redirect to last URL
      end
    end

  end
end

Version data entries

15 entries across 15 versions & 2 rubygems

Version Path
mongoid-forums-1.0.7 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.6 app/controllers/mongoid_forums/admin/base_controller.rb
ack-mongoid-forums-1.0.6.1 app/controllers/mongoid_forums/admin/base_controller.rb
ack-mongoid-forums-1.0.6 app/controllers/mongoid_forums/admin/base_controller.rb
ack-mongoid-forums-1.0.5 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.4 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.3 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.2 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.1 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-1.0.0 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-0.0.11 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-0.0.10 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-0.0.9 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-0.0.5 app/controllers/mongoid_forums/admin/base_controller.rb
mongoid-forums-0.0.4 app/controllers/mongoid_forums/admin/base_controller.rb