James Moger
2014-03-05 7ca05374db6f6af9de06665c9d2d08acfe85aa4f
src/main/java/com/gitblit/models/UserModel.java
@@ -67,6 +67,7 @@
   public boolean canFork;
   public boolean canCreate;
   public boolean excludeFromFederation;
   public boolean disabled;
   // retained for backwards-compatibility with RPC clients
   @Deprecated
   public final Set<String> repositories = new HashSet<String>();
@@ -446,6 +447,25 @@
      return canAdmin() || model.isUsersPersonalRepository(username) || model.isOwner(username);
   }
   public boolean canEdit(TicketModel ticket, RepositoryModel repository) {
       return isAuthenticated() &&
             (username.equals(ticket.createdBy)
             || username.equals(ticket.responsible)
             || canPush(repository));
   }
   public boolean canReviewPatchset(RepositoryModel model) {
      return isAuthenticated() && canClone(model);
   }
   public boolean canApprovePatchset(RepositoryModel model) {
      return isAuthenticated() && canPush(model);
   }
   public boolean canVetoPatchset(RepositoryModel model) {
      return isAuthenticated() && canPush(model);
   }
   /**
    * This returns true if the user has fork privileges or the user has fork
    * privileges because of a team membership.
@@ -527,6 +547,10 @@
      return false;
   }
   public boolean isAuthenticated() {
      return !UserModel.ANONYMOUS.equals(this) && isAuthenticated;
   }
   public boolean isTeamMember(String teamname) {
      for (TeamModel team : teams) {
         if (team.name.equalsIgnoreCase(teamname)) {