Sha256: 6e1d2a60f4afeffd48a83c831fd45c892354ccdb95cc6c4b29c07ec18df3f786

Contents?: true

Size: 381 Bytes

Versions: 34

Compression:

Stored size: 381 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 authorize_moderator!
    authorize! :moderator
  end

  def authorization_slug
    protection_slug || '_/_'
  end

  def protection_slug
    @slug
  end
end

Version data entries

34 entries across 34 versions & 1 rubygems

Version Path
mumuki-laboratory-8.6.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.6.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.5.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.4.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.3.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.2.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.2.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.1.3 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.1.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.1.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.1.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.12.3 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-8.0.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.12.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.12.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.11.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.11.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.10.5 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.10.4 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.10.3 app/controllers/concerns/with_authorization.rb