Package com.google.gerrit.server.project
Class CreateRefControl
- java.lang.Object
-
- com.google.gerrit.server.project.CreateRefControl
-
public class CreateRefControl extends Object
Manages access control for creating Git references (aka branches, tags).
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcheckCreateRef(com.google.inject.Provider<? extends CurrentUser> user, org.eclipse.jgit.lib.Repository repo, BranchNameKey destBranch, org.eclipse.jgit.revwalk.RevObject object, boolean forPush, BranchNameKey... sourceBranches)Checks whether theCurrentUsercan create a new Git ref.
-
-
-
Method Detail
-
checkCreateRef
public void checkCreateRef(com.google.inject.Provider<? extends CurrentUser> user, org.eclipse.jgit.lib.Repository repo, BranchNameKey destBranch, org.eclipse.jgit.revwalk.RevObject object, boolean forPush, BranchNameKey... sourceBranches) throws AuthException, PermissionBackendException, NoSuchProjectException, IOException, ResourceConflictException
Checks whether theCurrentUsercan create a new Git ref.- Parameters:
user- the user performing the operationrepo- repository on which user want to createdestBranch- the branch the newRevObjectshould be created onobject- the object the user will start the reference withsourceBranches- the source ref from which the new ref is created from- Throws:
AuthException- if creation is denied; the message explains the denial.PermissionBackendException- on failure of permission checks.ResourceConflictException- if the project state does not permit the operationNoSuchProjectExceptionIOException
-
-