Skip to content
Snippets Groups Projects

Receptive cluster agents

Closed Tiger Watson requested to merge receptive-cluster-agents into master
5 unresolved threads
Files
11
@@ -43,6 +43,9 @@ class UrlConfiguration < ApplicationRecord
@@ -43,6 +43,9 @@ class UrlConfiguration < ApplicationRecord
revoked: 1
revoked: 1
}
}
 
after_create :set_agent_receptive!
 
after_destroy :unset_agent_receptive!
 
private
private
def public_key_auth?
def public_key_auth?
@@ -52,6 +55,14 @@ def public_key_auth?
@@ -52,6 +55,14 @@ def public_key_auth?
def certificate_auth?
def certificate_auth?
!public_key_auth?
!public_key_auth?
end
end
 
 
def set_agent_receptive!
 
agent.update!(is_receptive: true)
 
end
 
 
def unset_agent_receptive!
 
agent.update!(is_receptive: false)
 
end
end
end
end
end
end
end
Loading