feat: setup invite to handle SAML enabled account [CW-5613] (#12439)

This commit is contained in:
Shivam Mishra
2025-09-17 19:33:38 +05:30
committed by GitHub
parent de4430ea5d
commit 7bc7ae5bc4
5 changed files with 349 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
module Enterprise::AgentBuilder
def perform
super.tap do |user|
convert_to_saml_provider(user) if user.persisted? && account.saml_enabled?
end
end
private
def convert_to_saml_provider(user)
user.update!(provider: 'saml') unless user.provider == 'saml'
end
end