summaryrefslogtreecommitdiffstats
path: root/src/main/java/com/gitblit/models/UserModel.java
diff options
context:
space:
mode:
authorJames Moger <james.moger@gitblit.com>2014-05-01 13:55:09 -0400
committerJames Moger <james.moger@gitblit.com>2014-05-01 13:55:09 -0400
commit0c8b287242e4fa45710a304570934201c8827e3e (patch)
tree39a0c9c501d8d202037ea467fcace08ff3c605fa /src/main/java/com/gitblit/models/UserModel.java
parent55dc95d6015dfb980a118a3f2aec2c43c773e90a (diff)
downloadgitblit-0c8b287242e4fa45710a304570934201c8827e3e.tar.gz
gitblit-0c8b287242e4fa45710a304570934201c8827e3e.zip
Fix inconsistency with owner permissions check
Diffstat (limited to 'src/main/java/com/gitblit/models/UserModel.java')
-rw-r--r--src/main/java/com/gitblit/models/UserModel.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/gitblit/models/UserModel.java b/src/main/java/com/gitblit/models/UserModel.java
index 64bca825..e1522748 100644
--- a/src/main/java/com/gitblit/models/UserModel.java
+++ b/src/main/java/com/gitblit/models/UserModel.java
@@ -552,15 +552,15 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel>
}
return false;
}
-
+
/**
* Returns true if the user is allowed to administer the specified repository
- *
+ *
* @param repo
* @return true if the user can administer the repository
*/
public boolean canAdmin(RepositoryModel repo) {
- return canAdmin() || isMyPersonalRepository(repo.name);
+ return canAdmin() || repo.isOwner(username) || isMyPersonalRepository(repo.name);
}
public boolean isAuthenticated() {