Project

General

Profile

Download (659 Bytes) Statistics
| Branch: | Tag: | Revision:

foreman_pipeline / app / models / foreman_pipeline / jenkins_user.rb @ be52ca64

1
module ForemanPipeline
2
  class JenkinsUser < Katello::Model
3
    self.include_root_in_json = false
4

    
5
    include Katello::Glue
6
    include Glue::ElasticSearch::JenkinsUser
7
    include ForemanPipeline::Authorization::JenkinsUser
8

    
9
    has_many :jobs, :class_name => "ForemanPipeline::Job", :dependent => :nullify
10
    belongs_to :organization
11
    belongs_to :jenkins_instance, :class_name => "ForemanPipeline::JenkinsInstance"
12
    belongs_to :owner, :class_name => "::User"    
13

    
14
    validates :name, :presence => true
15
    validates :token, :presence => true
16
    validates :jenkins_instance_id, :presence => true
17
    validates :owner_id, :presence => true
18
  end
19
end