James Moger
2012-10-13 c658df9e87d65b08d5482cf04489cb0532ff83dd
src/com/gitblit/GitBlit.java
@@ -642,6 +642,22 @@
                  "Failed to rename ''{0}'' because ''{1}'' already exists.", username,
                  user.username));
         }
         // rename repositories and owner fields for all repositories
         for (RepositoryModel model : getRepositoryModels(user)) {
            if (model.isUsersPersonalRepository(username)) {
               // personal repository
               model.owner = user.username;
               String oldRepositoryName = model.name;
               model.name = "~" + user.username + model.name.substring(model.projectPath.length());
               model.projectPath = "~" + user.username;
               updateRepositoryModel(oldRepositoryName, model, false);
            } else if (model.isOwner(username)) {
               // common/shared repo
               model.owner = user.username;
               updateRepositoryModel(model.name, model, false);
            }
         }
      }
      if (!userService.updateUserModel(username, user)) {
         throw new GitBlitException(isCreate ? "Failed to add user!" : "Failed to update user!");
@@ -1241,6 +1257,7 @@
               "accessRestriction", settings.getString(Keys.git.defaultAccessRestriction, null)));
         model.authorizationControl = AuthorizationControl.fromName(getConfig(config,
               "authorizationControl", settings.getString(Keys.git.defaultAuthorizationControl, null)));
         model.verifyCommitter = getConfig(config, "verifyCommitter", false);
         model.showRemoteBranches = getConfig(config, "showRemoteBranches", hasOrigin);
         model.isFrozen = getConfig(config, "isFrozen", false);
         model.showReadme = getConfig(config, "showReadme", false);
@@ -1682,6 +1699,7 @@
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "allowForks", repository.allowForks);
      config.setString(Constants.CONFIG_GITBLIT, null, "accessRestriction", repository.accessRestriction.name());
      config.setString(Constants.CONFIG_GITBLIT, null, "authorizationControl", repository.authorizationControl.name());
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "verifyCommitter", repository.verifyCommitter);
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "showRemoteBranches", repository.showRemoteBranches);
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "isFrozen", repository.isFrozen);
      config.setBoolean(Constants.CONFIG_GITBLIT, null, "showReadme", repository.showReadme);