Sha256: 842b0992d83d518aaa7ffa2d8b99db118fb66c1a4df996b36c2c105f751652fd
Contents?: true
Size: 647 Bytes
Versions: 14
Compression:
Stored size: 647 Bytes
Contents
# frozen_string_literal: true require 'accession' class APISubject < ApplicationRecord include Accession::Principal has_many :api_subject_roles, dependent: :destroy has_many :roles, through: :api_subject_roles, dependent: :destroy valhammer validates :x509_cn, format: { with: /\A[\w-]+\z/ } def permissions # This could be extended to gather permissions from # other data sources providing input to api_subject identity roles.joins(:permissions).pluck('permissions.value') end def functioning? # more than enabled? could inform functioning? # such as an administrative or AAF lock enabled? end end
Version data entries
14 entries across 14 versions & 1 rubygems