X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7b070fc8458f4108d44d6bfb939e36d3cc76af84..44c93373e97da98645d41ae8f09c6eef6788bb26:/services/api/app/models/user.rb diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index 44e6ca7578..bbb2378f5c 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -21,6 +21,7 @@ class User < ArvadosModel uniqueness: true, allow_nil: true) validate :must_unsetup_to_deactivate + validate :identity_url_nil_if_empty before_update :prevent_privilege_escalation before_update :prevent_inactive_admin before_update :verify_repositories_empty, :if => Proc.new { @@ -828,4 +829,10 @@ SELECT target_uuid, perm_level repo.save! end end + + def identity_url_nil_if_empty + if identity_url == "" + self.identity_url = nil + end + end end