diff options
Diffstat (limited to 'src/main/java/com/gitblit/models/UserModel.java')
-rw-r--r-- | src/main/java/com/gitblit/models/UserModel.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/main/java/com/gitblit/models/UserModel.java b/src/main/java/com/gitblit/models/UserModel.java index 6419cce9..63208f35 100644 --- a/src/main/java/com/gitblit/models/UserModel.java +++ b/src/main/java/com/gitblit/models/UserModel.java @@ -446,6 +446,18 @@ public class UserModel implements Principal, Serializable, Comparable<UserModel> return canAdmin() || model.isUsersPersonalRepository(username) || model.isOwner(username);
}
+ public boolean canReviewPatchset(RepositoryModel model) {
+ return isAuthenticated && canClone(model);
+ }
+
+ public boolean canApprovePatchset(RepositoryModel model) {
+ return isAuthenticated && canPush(model);
+ }
+
+ public boolean canVetoPatchset(RepositoryModel model) {
+ return isAuthenticated && canPush(model);
+ }
+
/**
* This returns true if the user has fork privileges or the user has fork
* privileges because of a team membership.
|