Sha256: c96eae2faee404c754717d1285a3055fd0b6f6f4e971cca1f77cf086c7fa5c2b
Contents?: true
Size: 841 Bytes
Versions: 9
Compression:
Stored size: 841 Bytes
Contents
# frozen_string_literal: true require 'graphql' module Osso module GraphQL module Types class EnterpriseAccount < Types::BaseObject description 'An Account for a company that wishes to use SAML via Osso' implements ::GraphQL::Types::Relay::Node global_id_field :gid field :id, ID, null: false field :name, String, null: false field :domain, String, null: false field :identity_providers, [Types::IdentityProvider], null: true field :status, String, null: false def status 'active' end def identity_providers object.identity_providers end def self.authorized?(object, context) super && (context[:scope] == :admin || object.domain == context[:scope]) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems