James Moger
2015-09-18 a592329a82d0a85d33abcc63f08df20b79e8e4f7
src/main/java/com/gitblit/models/RepositoryModel.java
@@ -51,7 +51,6 @@
   public String lastChangeAuthor;
   public boolean hasCommits;
   public boolean showRemoteBranches;
   public boolean useDocs;
   public boolean useIncrementalPushTags;
   public String incrementalPushTagPrefix;
   public AccessRestrictionType accessRestriction;
@@ -86,6 +85,10 @@
   public int maxActivityCommits;
   public List<String> metricAuthorExclusions;
   public CommitMessageRenderer commitMessageRenderer;
   public boolean acceptNewPatchsets;
   public boolean acceptNewTickets;
   public boolean requireApproval;
   public String mergeTo;
   public transient boolean isCollectingGarbage;
   public Date lastGC;
@@ -106,6 +109,8 @@
      this.projectPath = StringUtils.getFirstPathElement(name);
      this.owners = new ArrayList<String>();
      this.isBare = true;
      this.acceptNewTickets = true;
      this.acceptNewPatchsets = true;
      addOwner(owner);
   }
@@ -141,6 +146,10 @@
      displayName = null;
   }
   public String getRID() {
      return StringUtils.getSHA1(name);
   }
   @Override
   public int hashCode() {
      return name.hashCode();
@@ -173,9 +182,9 @@
   public boolean isOwner(String username) {
      if (StringUtils.isEmpty(username) || ArrayUtils.isEmpty(owners)) {
         return false;
         return isUsersPersonalRepository(username);
      }
      return owners.contains(username.toLowerCase());
      return owners.contains(username.toLowerCase()) || isUsersPersonalRepository(username);
   }
   public boolean isPersonalRepository() {
@@ -210,7 +219,8 @@
      clone.federationStrategy = federationStrategy;
      clone.showRemoteBranches = false;
      clone.allowForks = false;
      clone.useDocs = useDocs;
      clone.acceptNewPatchsets = false;
      clone.acceptNewTickets = false;
      clone.skipSizeCalculation = skipSizeCalculation;
      clone.skipSummaryMetrics = skipSummaryMetrics;
      clone.sparkleshareId = sparkleshareId;