Remove PermissionBackend#user(Provider<CurrentUser>)
Checking permissions of users that aren't the caller on the current request can have implications on the security of the system. The most prominent one is creating a group-oracle. To limit the cases where we could potentially expose Gerrit to these threats, PermissionBackend removes the method that was operating solely on the provider of the current user. Change-Id: I601ea1200a15a5f262ca0770b23cc1c7bee126b1
This commit is contained in:
@@ -62,7 +62,7 @@ public class GetExternalIds implements RestReadView<AccountResource> {
|
||||
public List<AccountExternalIdInfo> apply(AccountResource resource)
|
||||
throws RestApiException, IOException, OrmException, PermissionBackendException {
|
||||
if (self.get() != resource.getUser()) {
|
||||
permissionBackend.user(self).check(GlobalPermission.ACCESS_DATABASE);
|
||||
permissionBackend.currentUser().check(GlobalPermission.ACCESS_DATABASE);
|
||||
}
|
||||
|
||||
Collection<ExternalId> ids = externalIds.byAccount(resource.getUser().getAccountId());
|
||||
|
||||
Reference in New Issue
Block a user