Sha256: 7bc0ee7cc09accc00e76a1248e34acccae046b4fc2f969ad82c391435fe39dbb

Contents?: true

Size: 498 Bytes

Versions: 19

Compression:

Stored size: 498 Bytes

Contents

require 'active_support/concern'
module Cms
  module Fortress
    module SiteControllerMethods
      extend ActiveSupport::Concern

      included do
        before_action do
          authorize! :manage, Comfy::Cms::Site
        end
        before_action only: [:new, :create] do
          raise CanCan::AccessDenied.new("You are not allowed to create a site.") unless current_cms_fortress_user.type.eql?(:super_user)
        end
      end

      module ClassMethods

      end

    end
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
cms-fortress-1.3.15 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.14 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.13 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.12 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.11 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.10 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.9 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.8 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.7 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.6 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.5 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.4 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.3 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.2 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.1 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.0 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.0.rc3 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.0.rc2 lib/cms/fortress/sites_controller_methods.rb
cms-fortress-1.3.0.rc1 lib/cms/fortress/sites_controller_methods.rb