Sha256: c0cfa7e4e7358ea4bf706c57bbdf48730b19bb04348244e3206b67b354a6aed2

Contents?: true

Size: 321 Bytes

Versions: 21

Compression:

Stored size: 321 Bytes

Contents

module WithAuthorization
  extend ActiveSupport::Concern

  def authorize_janitor!
    authorize! :janitor
  end

  def authorize_admin!
    authorize! :admin
  end

  def authorize_owner!
    authorize! :owner
  end

  def authorization_slug
    protection_slug || '_/_'
  end

  def protection_slug
    @slug
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
mumuki-laboratory-7.6.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.6.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.6.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.5.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.5.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.5.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.4.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.4.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.4.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.3.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.3.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.2.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.1.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.12 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.11 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.10 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.9 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.8 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.7 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.0.6 app/controllers/concerns/with_authorization.rb