Sha256: 3e0cc72b4970c891d63a877af0002efeb696e9556e1fbc94c907b5fd1ba9a8e3

Contents?: true

Size: 269 Bytes

Versions: 53

Compression:

Stored size: 269 Bytes

Contents

module WithAuthorization
  extend ActiveSupport::Concern

  def authorize_janitor!
    authorize! :janitor
  end

  def authorize_owner!
    authorize! :owner
  end

  def authorization_slug
    protection_slug || '_/_'
  end

  def protection_slug
    @slug
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
mumuki-laboratory-6.7.7 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.6 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.5 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.4 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.3 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.7.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.6.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.6.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.5.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.5.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.4.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.4.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.4.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.2.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.1.5 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.0.4 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.1.4 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-6.1.3 app/controllers/concerns/with_authorization.rb