From 6651a8e96bdc51b0c558b88e1c77fcfbed1837da Mon Sep 17 00:00:00 2001 From: James Moger Date: Sun, 8 Jun 2014 10:30:39 -0400 Subject: Move repository ownership to the UserModel and prepare for project ownership --- src/main/java/com/gitblit/git/GitblitReceivePack.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/gitblit/git') diff --git a/src/main/java/com/gitblit/git/GitblitReceivePack.java b/src/main/java/com/gitblit/git/GitblitReceivePack.java index 34bbea27..0090930a 100644 --- a/src/main/java/com/gitblit/git/GitblitReceivePack.java +++ b/src/main/java/com/gitblit/git/GitblitReceivePack.java @@ -286,7 +286,7 @@ public class GitblitReceivePack extends ReceivePack implements PreReceiveHook, P } else if (ref.equals(BranchTicketService.BRANCH)) { // ensure pushing user is an administrator OR an owner // i.e. prevent ticket tampering - boolean permitted = user.canAdmin() || repository.isOwner(user.username); + boolean permitted = user.canAdmin() || user.isOwner(repository); if (!permitted) { sendRejection(cmd, "{0} is not permitted to push to {1}", user.username, ref); } -- cgit v1.2.3