From 4e7813c54c8d735a337d36d411cd7864d420b040 Mon Sep 17 00:00:00 2001
From: Philip L. McMahon <philip.l.mcmahon@gmail.com>
Date: Sun, 05 Feb 2012 01:02:32 -0500
Subject: [PATCH] Add protect-refs unit tests for branch/tag creation/deletion.
---
src/com/gitblit/models/UserModel.java | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/src/com/gitblit/models/UserModel.java b/src/com/gitblit/models/UserModel.java
index bd8974d..ecb97cf 100644
--- a/src/com/gitblit/models/UserModel.java
+++ b/src/com/gitblit/models/UserModel.java
@@ -96,6 +96,18 @@
return false;
}
+ public TeamModel getTeam(String teamname) {
+ if (teams == null) {
+ return null;
+ }
+ for (TeamModel team : teams) {
+ if (team.name.equalsIgnoreCase(teamname)) {
+ return team;
+ }
+ }
+ return null;
+ }
+
@Override
public String getName() {
return username;
--
Gitblit v1.9.1