Sha256: 4b83382f1ada6882f4f3e04f138345e1bda66ecff9e0b68593ceeb1b7bbfd259
Contents?: true
Size: 405 Bytes
Versions: 1
Compression:
Stored size: 405 Bytes
Contents
# frozen_string_literal: true module Servicer module Layers # Layer verifying if current user exists, and raises ::Servicer::AAuthorizationError otherwise. # Example: # layer :require_user class RequireUser < ::Servicer::Layers::Base def call(current_user, params) raise AuthorizationError if current_user.nil? [current_user, params] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
servicer-1.0.0 | lib/servicer/layers/require_user.rb |