Update of parent project: defaults to be 'All-Projects'

When users upate parent project, the default value of
parent project will be 'All-Projects' if users leave it
to be empty, just as that in ceating new project scenario,
thus users need not to recall it should be 'All-Projects'
or 'All_Project' or 'All-projects'.

Change-Id: I831da9cc5fa19c50e8754a0e2a86fc849e21f785
This commit is contained in:
Bruce Zu
2013-11-25 15:36:23 +08:00
committed by Edwin Kempin
parent 138a99ba1c
commit 1128c602cc

View File

@@ -16,6 +16,7 @@ package com.google.gerrit.httpd.rpc.project;
import static com.google.gerrit.common.ProjectAccessUtil.mergeSections;
import com.google.common.base.Objects;
import com.google.gerrit.common.data.AccessSection;
import com.google.gerrit.common.data.GroupReference;
import com.google.gerrit.common.data.Permission;
@@ -138,7 +139,8 @@ public abstract class ProjectAccessHandler<T> extends Handler<T> {
parentProjectUpdate = true;
try {
setParent.get().validateParentUpdate(projectControl,
parentProjectName.get(), checkIfOwner);
Objects.firstNonNull(parentProjectName, allProjects.get()).get(),
checkIfOwner);
} catch (AuthException e) {
throw new UpdateParentFailedException(
"You are not allowed to change the parent project since you are "