James Moger
2013-01-05 9e186eedf1a09ca7ac4fbdea32b00e7e5331f7eb
src/com/gitblit/wicket/pages/RepositoryPage.java
@@ -112,10 +112,10 @@
               // workaround until get().getUser() is reviewed throughout the app
               user = UserModel.ANONYMOUS;
            }
            boolean canAccess = user.hasBranchPermission(repositoryName,
            boolean canAccess = user.canView(getRepositoryModel(),
                        branch.reference.getName());
            if (!canAccess) {
               error(getString("gb.accessDeined"), true);
               error(getString("gb.accessDenied"), true);
            }
         }
      }
@@ -154,7 +154,9 @@
      pages.put("branches", new PageRegistration("gb.branches", BranchesPage.class, params));
      pages.put("tags", new PageRegistration("gb.tags", TagsPage.class, params));
      pages.put("tree", new PageRegistration("gb.tree", TreePage.class, params));
      pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params));
      if (GitBlit.getBoolean(Keys.web.allowForking, true)) {
         pages.put("forks", new PageRegistration("gb.forks", ForksPage.class, params));
      }
      // conditional links
      Repository r = getRepository();
@@ -191,7 +193,7 @@
   }
   
   protected boolean allowForkControls() {
      return true;
      return GitBlit.getBoolean(Keys.web.allowForking, true);
   }
   @Override
@@ -324,7 +326,7 @@
         RepositoryModel model = GitBlit.self().getRepositoryModel(
               GitBlitWebSession.get().getUser(), repositoryName);
         if (model == null) {
            if (GitBlit.self().hasRepository(repositoryName)) {
            if (GitBlit.self().hasRepository(repositoryName, true)) {
               // has repository, but unauthorized
               authenticationError(getString("gb.unauthorizedAccessForRepository") + " " + repositoryName);
            } else {
@@ -425,7 +427,7 @@
   }
   protected String getShortObjectId(String objectId) {
      return objectId.substring(0, 8);
      return objectId.substring(0, GitBlit.getInteger(Keys.web.shortCommitIdLength, 6));
   }
   protected void addRefs(Repository r, RevCommit c) {
@@ -448,6 +450,8 @@
         Constants.SearchType searchType) {
      String name = identity == null ? "" : identity.getName();
      String address = identity == null ? "" : identity.getEmailAddress();
      name = StringUtils.removeNewlines(name);
      address = StringUtils.removeNewlines(address);
      boolean showEmail = GitBlit.getBoolean(Keys.web.showEmailAddresses, false);
      if (!showEmail || StringUtils.isEmpty(name) || StringUtils.isEmpty(address)) {
         String value = name;
@@ -597,4 +601,4 @@
         getRequestCycle().setRequestTarget(new RedirectRequestTarget(absoluteUrl));
      }
   }
}
}