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-7.10.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.10.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.10.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.9.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.9.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.9.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.6 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.5 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.4 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.8.0 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.3 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.2 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.1 app/controllers/concerns/with_authorization.rb
mumuki-laboratory-7.7.0 app/controllers/concerns/with_authorization.rb