aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@gmail.com>2012-05-11 14:05:45 +0200
committerSimon Brandhof <simon.brandhof@gmail.com>2012-05-11 14:05:45 +0200
commite24822a8ce95b8b3384292c641ca13af275b85f5 (patch)
tree1210f4d093e210be35ece8f3b3836a36e4199265
parent5a52df7eaf298dc28d7217c4955998db399bae13 (diff)
downloadsonarqube-e24822a8ce95b8b3384292c641ca13af275b85f5.tar.gz
sonarqube-e24822a8ce95b8b3384292c641ca13af275b85f5.zip
SONAR-2950 allow to delete users created via SSO
-rw-r--r--sonar-server/src/main/webapp/WEB-INF/app/models/user.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
index 019809fa77b..9e379bd3f80 100644
--- a/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
+++ b/sonar-server/src/main/webapp/WEB-INF/app/models/user.rb
@@ -90,7 +90,9 @@ class User < ActiveRecord::Base
def deactivate
self.active = false
self.groups.clear
- self.save!
+
+ # do not validate user, for example when user created via SSO has no password
+ self.save(false)
self.user_roles.each {|role| role.delete}
self.properties.each {|prop| prop.delete}
self.filters.each {|f| f.destroy}