diff options
author | Sven Selberg <svense@axis.com> | 2020-12-17 10:18:37 +0100 |
---|---|---|
committer | Sven Selberg <sven.selberg@axis.com> | 2020-12-21 11:45:54 +0000 |
commit | 0995fe0445f507279c05cb5ee60a9413671be400 (patch) | |
tree | 282a50e34b7618a443aa089c127fe06558ff05e6 | |
parent | c4df2f1eb9fe470debf4958e05cf29c2ec314b43 (diff) |
Don't check read permission when authgroup isn't set
It's unnecessary to check read permission when authGroup isn't set since
the then the user is a RemoteSiteUser that is-an InternalUser that has
read access to everything.
Change-Id: Ie6985250b0acb50c08fdcae75cc608222b1add35
-rw-r--r-- | src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java index 5e7b6b8..62ea42b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java +++ b/src/main/java/com/googlesource/gerrit/plugins/replication/Destination.java @@ -329,6 +329,9 @@ public class Destination { if (PushOne.ALL_REFS.equals(ref)) { return true; } + if (userProvider.get().isInternalUser()) { + return true; + } try { permissionBackend .user(userProvider.get()) |