\r
#### fixes\r
\r
+- Fixed bug where repository ownership was not updated on rename user\r
- Fixed bug in create/rename repository if you explicitly specified the alias for the root group (e.g. main/myrepo) (issue 143)\r
- Wrapped Markdown parser with improved exception handler (issue 142)\r
- Fixed duplicate entries in repository cache (issue 140)\r
"Failed to rename ''{0}'' because ''{1}'' already exists.", username,\r
user.username));\r
}\r
+ \r
+ // rename repositories and owner fields for all repositories\r
+ for (RepositoryModel model : getRepositoryModels(user)) {\r
+ if (model.isUsersPersonalRepository(username)) {\r
+ // personal repository\r
+ model.owner = user.username;\r
+ String oldRepositoryName = model.name;\r
+ model.name = "~" + user.username + model.name.substring(model.projectPath.length());\r
+ model.projectPath = "~" + user.username;\r
+ updateRepositoryModel(oldRepositoryName, model, false);\r
+ } else if (model.isOwner(username)) {\r
+ // common/shared repo\r
+ model.owner = user.username;\r
+ updateRepositoryModel(model.name, model, false);\r
+ }\r
+ }\r
}\r
if (!userService.updateUserModel(username, user)) {\r
throw new GitBlitException(isCreate ? "Failed to add user!" : "Failed to update user!");\r