Bret K. Ikehara
2013-08-04 cd9461c0c05958444d1313b794be57df39d98956
src/main/java/com/gitblit/models/RepositoryModel.java
@@ -26,8 +26,10 @@
import com.gitblit.Constants.AccessRestrictionType;
import com.gitblit.Constants.AuthorizationControl;
import com.gitblit.Constants.CommitMessageRenderer;
import com.gitblit.Constants.FederationStrategy;
import com.gitblit.utils.ArrayUtils;
import com.gitblit.utils.ModelUtils;
import com.gitblit.utils.StringUtils;
/**
@@ -46,6 +48,7 @@
   public String description;
   public List<String> owners;
   public Date lastChange;
   public String lastChangeAuthor;
   public boolean hasCommits;
   public boolean showRemoteBranches;
   public boolean useTickets;
@@ -81,7 +84,9 @@
   public boolean verifyCommitter;
   public String gcThreshold;
   public int gcPeriod;
   public int maxActivityCommits;
   public int maxActivityCommits;
   public List<String> metricAuthorExclusions;
   public CommitMessageRenderer commitMessageRenderer;
   
   public transient boolean isCollectingGarbage;
   public Date lastGC;
@@ -175,17 +180,21 @@
   }
   
   public boolean isPersonalRepository() {
      return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';
      return !StringUtils.isEmpty(projectPath) && ModelUtils.isPersonalRepository(projectPath);
   }
   
   public boolean isUsersPersonalRepository(String username) {
      return !StringUtils.isEmpty(projectPath) && projectPath.equalsIgnoreCase("~" + username);
      return !StringUtils.isEmpty(projectPath) && ModelUtils.isUsersPersonalRepository(username, projectPath);
   }
   
   public boolean allowAnonymousView() {
      return !accessRestriction.atLeast(AccessRestrictionType.VIEW);
   }
   
   public boolean isShowActivity() {
      return maxActivityCommits > -1;
   }
   public boolean isSparkleshared() {
      return !StringUtils.isEmpty(sparkleshareId);
   }