debian-mirror-gitlab/app/models/clusters/agents/group_authorization.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
536 B
Ruby
Raw Normal View History

2021-11-11 11:23:49 +05:30
# frozen_string_literal: true
module Clusters
module Agents
class GroupAuthorization < ApplicationRecord
2021-12-11 22:18:48 +05:30
include ::Clusters::Agents::AuthorizationConfigScopes
2021-11-11 11:23:49 +05:30
self.table_name = 'agent_group_authorizations'
belongs_to :agent, class_name: 'Clusters::Agent', optional: false
belongs_to :group, class_name: '::Group', optional: false
validates :config, json_schema: { filename: 'cluster_agent_authorization_configuration' }
2021-11-18 22:05:49 +05:30
def config_project
agent.project
end
2021-11-11 11:23:49 +05:30
end
end
end