Adapt to new ProjectControl on stable-2.14/master

Change-Id: I29fd1b5b445832e8446936922d8501b54f64e33b
diff --git a/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritToGitBlitUserModel.java b/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritToGitBlitUserModel.java
index 49951cf..1160c1d 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritToGitBlitUserModel.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/gitblit/auth/GerritToGitBlitUserModel.java
@@ -73,7 +73,7 @@
 
     try {
       ProjectControl control =
-          projectControlFactory.validateFor(new NameKey(repositoryName));
+          projectControlFactory.controlFor(new NameKey(repositoryName));
       result = control != null;
     } catch (NoSuchProjectException e) {
       result = false;
@@ -89,7 +89,7 @@
 
     try {
       ProjectControl control =
-          projectControlFactory.validateFor(new NameKey(
+          projectControlFactory.controlFor(new NameKey(
               getRepositoryName(repository.name)));
 
       if (control == null) {
@@ -98,7 +98,7 @@
 
       switch (ifRestriction) {
         case VIEW:
-          return control.isVisible();
+          return !control.isHidden();
         case CLONE:
           return control.canRunUploadPack();
         case PUSH:
@@ -127,8 +127,8 @@
     try {
       name = getRepositoryName(name);
       ProjectControl control =
-          projectControlFactory.validateFor(new NameKey(name));
-      result = control != null && control.isVisible();
+          projectControlFactory.controlFor(new NameKey(name));
+      result = control != null && !control.isHidden();
     } catch (NoSuchProjectException e) {
       result = false;
     }