Bump to 2.10-SNAPSHOT
Adjust the RefControl.canCreate() in order to check
if an image can be uploaded if does not exist on the server.
(2.10 RefControl interface)
Change-Id: I63fb3cff54eb3f4968675cb9573fe7897f92a096
diff --git a/pom.xml b/pom.xml
index f6ec4f3..f48abf5 100644
--- a/pom.xml
+++ b/pom.xml
@@ -26,7 +26,7 @@
<properties>
<Gerrit-ApiType>plugin</Gerrit-ApiType>
- <Gerrit-ApiVersion>2.9-SNAPSHOT</Gerrit-ApiVersion>
+ <Gerrit-ApiVersion>2.10-SNAPSHOT</Gerrit-ApiVersion>
</properties>
<build>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/imagare/PostImage.java b/src/main/java/com/googlesource/gerrit/plugins/imagare/PostImage.java
index 843815e..ffc966a 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/imagare/PostImage.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/imagare/PostImage.java
@@ -189,7 +189,7 @@
commitId = oi.insert(cb);
oi.flush();
- if (!rc.canCreate(rw, rw.parseCommit(commitId))) {
+ if (!rc.canCreate(rw, rw.parseCommit(commitId), false)) {
throw new AuthException(String.format(
"Project %s doesn't allow image upload.", pc.getProject().getName()));
}