Apply @RequiresCapability to REST API
Move the @RequiresCapability from SSHD to gerrit-extension-api. Modify the RestApiServlet to check the current user has the required capabilities. All RestApiServlets must now inject the currentUser provider in their constructor and pass it to the super class. Signed-off-by: Brad Larson <bklarson@gmail.com> Change-Id: Iffc9bc99b8d2fafd07bf624008719b0ec647ce7d
This commit is contained in:
@@ -16,6 +16,7 @@ package com.google.gerrit.sshd;
|
||||
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.util.concurrent.Atomics;
|
||||
import com.google.gerrit.extensions.annotations.RequiresCapability;
|
||||
import com.google.gerrit.server.CurrentUser;
|
||||
import com.google.gerrit.server.account.CapabilityControl;
|
||||
import com.google.gerrit.sshd.args4j.SubcommandHandler;
|
||||
|
||||
Reference in New Issue
Block a user