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 void
checkCreateRef(com.google.inject.Provider<? extends CurrentUser> user, org.eclipse.jgit.lib.Repository repo, BranchNameKey branch, org.eclipse.jgit.revwalk.RevObject object)
Checks whether theCurrentUser
can 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 branch, org.eclipse.jgit.revwalk.RevObject object) throws AuthException, PermissionBackendException, NoSuchProjectException, IOException, ResourceConflictException
Checks whether theCurrentUser
can create a new Git ref.- Parameters:
user
- the user performing the operationrepo
- repository on which user want to createbranch
- the branch the newRevObject
should be created onobject
- the object the user will start the reference with- 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 operationNoSuchProjectException
IOException
-
-