summaryrefslogtreecommitdiffstats
path: root/src/com/gitblit/models/RepositoryModel.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2012-10-03 17:50:48 -0400
committerJames Moger <james.moger@gitblit.com>2012-10-03 17:50:48 -0400
commitec0ce1621a3e145d5786c0c26caffd0c5c3acd61 (patch)
tree90964958d81d755c5518a240c3b167ea04bf67c2 /src/com/gitblit/models/RepositoryModel.java
parentc25b9801899e86753dd6ba80ebc68102ee37a21c (diff)
downloadgitblit-ec0ce1621a3e145d5786c0c26caffd0c5c3acd61.tar.gz
gitblit-ec0ce1621a3e145d5786c0c26caffd0c5c3acd61.zip
Fix anonymous browsing of user profile page
Diffstat (limited to 'src/com/gitblit/models/RepositoryModel.java')
-rw-r--r--src/com/gitblit/models/RepositoryModel.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/com/gitblit/models/RepositoryModel.java b/src/com/gitblit/models/RepositoryModel.java
index 65629faf..caf7e7e4 100644
--- a/src/com/gitblit/models/RepositoryModel.java
+++ b/src/com/gitblit/models/RepositoryModel.java
@@ -152,6 +152,10 @@ public class RepositoryModel implements Serializable, Comparable<RepositoryModel
return !StringUtils.isEmpty(originRepository);
}
+ public boolean isOwner(String username) {
+ return owner != null && username != null && owner.equalsIgnoreCase(username);
+ }
+
public boolean isPersonalRepository() {
return !StringUtils.isEmpty(projectPath) && projectPath.charAt(0) == '~';
}