Class: Insika::Policy::Builtin::SkillAllowlist

Inherits:
Insika::Policy::Base show all
Defined in:
lib/insika/policy/policy.rb

Overview

nil/[]/[names] semantics of profile.skills. effective stays in the catalog (query); the DECISION to use it is here.

Instance Method Summary collapse

Methods inherited from Insika::Policy::Base

#id

Instance Method Details

#decide(request) ⇒ Object



87
88
89
90
# File 'lib/insika/policy/policy.rb', line 87

def decide(request)
  allow = request.profile.skills.nil? ? nil : Array(request.profile.skills).map(&:to_s)
  Decision.allow(allow_skills: allow)
end