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:
@@ -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 "
|
||||
|
Reference in New Issue
Block a user