Sha256: 497dcdf2011a6bb72a26b6304ff9b74f73201bc71fdc7dc1eb6de4a5994f1817
Contents?: true
Size: 456 Bytes
Versions: 1
Compression:
Stored size: 456 Bytes
Contents
# frozen_string_literal: true module Doorkeeper module Models module Scopes def scopes OAuth::Scopes.from_string(scopes_string) end def scopes=(value) super Array(value).join(' ') end def scopes_string self[:scopes] end def includes_scope?(*required_scopes) required_scopes.blank? || required_scopes.any? { |scope| scopes.exists?(scope.to_s) } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
doorkeeper-5.1.0.rc2 | lib/doorkeeper/models/concerns/scopes.rb |