summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/models/UserModel.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2011-12-13 17:36:58 -0500
committerJames Moger <james.moger@gitblit.com>2011-12-13 17:36:58 -0500
commit997c16d6826cfa1bef33ba08e15055cc407b9398 (patch)
tree124c737565cfdec1eddce9b9432f4e5798a380b2 /src/com/gitblit/models/UserModel.java
parentd17f433bf1c709b4daab58f503a142dd5e19cc4a (diff)
downloadgitblit-997c16d6826cfa1bef33ba08e15055cc407b9398.tar.gz
gitblit-997c16d6826cfa1bef33ba08e15055cc407b9398.zip
Federation support for Teams
Diffstat (limited to 'src/com/gitblit/models/UserModel.java')
-rw-r--r--src/com/gitblit/models/UserModel.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/com/gitblit/models/UserModel.java b/src/com/gitblit/models/UserModel.java
index bd8974d7..ecb97cfc 100644
--- a/src/com/gitblit/models/UserModel.java
+++ b/src/com/gitblit/models/UserModel.java
@@ -96,6 +96,18 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
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;