Sha256: b4b1b056b8ee1845bfd8a3d236c84ecf2a8e07a85314d2875519f7d1fdecba7e

Contents?: true

Size: 357 Bytes

Versions: 7

Compression:

Stored size: 357 Bytes

Contents

# Controller concern for authorization using Pundit. This ensures that actions
# properly use Pundit's authorization hooks (`authorize` and `policy_scope`).
module Authorization
  extend ActiveSupport::Concern
  include Pundit

  included do
    after_action :verify_authorized, except: :index
    after_action :verify_policy_scoped, only: :index
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
stationed-0.6.0 lib/stationed/generators/templates/authorization.rb
stationed-0.5.0 lib/stationed/generators/templates/authorization.rb
stationed-0.4.0 lib/stationed/generators/templates/authorization.rb
stationed-0.3.0 lib/stationed/generators/templates/authorization.rb
stationed-0.2.0 lib/stationed/generators/templates/authorization.rb
stationed-0.1.0 lib/stationed/generators/templates/authorization.rb
stationed-0.0.1 lib/stationed/generators/templates/authorization.rb