When removing a user that has privileges to a repository, the deletetion of the user is successful but the page returns blank. The error log of apache says 'Database inconsistent'. This is because the user privileges still exist, yet the user does not. The following is a patch that adds an SQL query to remove all privileges pertaining to the deleted user.
Index: svnmanager/UserModule/DataModule.php
--- svnmanager/UserModule/DataModule.php (revision 5)
+++ svnmanager/UserModule/DataModule.php (working copy)
@@ -144,9 +144,11 @@
$results = $this->Database->Execute("SELECT name FROM users WHERE id='$id'");
$name = $results->fields['name'];
+ //Remove user privileges from all repositories
+ $this->Database->Execute("DELETE FROM userprivileges
+WHERE userid='$id'");
//Remove user
$this->Database->Execute("DELETE FROM users WHERE id='$id'");
-
exec("$htpassword_cmd -D $svn_passwd_file $name");
$this->rebuildAccessfile();
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When removing a user that has privileges to a repository, the deletetion of the user is successful but the page returns blank. The error log of apache says 'Database inconsistent'. This is because the user privileges still exist, yet the user does not. The following is a patch that adds an SQL query to remove all privileges pertaining to the deleted user.
Index: svnmanager/UserModule/DataModule.php
--- svnmanager/UserModule/DataModule.php (revision 5)
+++ svnmanager/UserModule/DataModule.php (working copy)
@@ -144,9 +144,11 @@
$results = $this->Database->Execute("SELECT name FROM users WHERE id='$id'");
$name = $results->fields['name'];
+ //Remove user privileges from all repositories
+ $this->Database->Execute("DELETE FROM userprivileges
+WHERE userid='$id'");
//Remove user
$this->Database->Execute("DELETE FROM users WHERE id='$id'");
-
exec("$htpassword_cmd -D $svn_passwd_file $name");
$this->rebuildAccessfile();