Sha256: 09796d3c4755e3cf54cf6167c79dc9162fa7ae1e93f992f088fa92c1ad6371eb

Contents?: true

Size: 247 Bytes

Versions: 3

Compression:

Stored size: 247 Bytes

Contents

class ApplicationController < Sinatra::Base
  # Include Pundit for authorization
  include Pundit

  helpers do
    def authorized?(policy, permission)
      return false unless authenticated?
      policy(policy).send permission
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eucalypt-0.2.2 lib/eucalypt/eucalypt-security/namespaces/security-pundit/templates/pundit.tt
eucalypt-0.2.1 lib/eucalypt/eucalypt-security/namespaces/security-pundit/templates/pundit.tt
eucalypt-0.2.0 lib/eucalypt/eucalypt-security/namespaces/security-pundit/templates/pundit.tt