use of com.sequenceiq.authorization.annotation.AccountIdNotNeeded in project cloudbreak by hortonworks.
the class UserV1Controller method synchronizeAllUsers.
@Override
@AccountIdNotNeeded
@CustomPermissionCheck
public SyncOperationStatus synchronizeAllUsers(SynchronizeAllUsersRequest request) {
String userCrn = checkActorCrn();
String accountId = determineAccountId(userCrn, request.getAccountId());
LOGGER.debug("synchronizeAllUsers() requested for account {}", accountId);
UserSyncRequestFilter userSyncFilter = new UserSyncRequestFilter(nullToEmpty(request.getUsers()), nullToEmpty(request.getMachineUsers()), getOptionalDeletedWorkloadUser(request.getDeletedWorkloadUsers()));
Operation syncOperation = userSyncService.synchronizeUsersWithCustomPermissionCheck(accountId, userCrn, nullToEmpty(request.getEnvironments()), userSyncFilter, request.getWorkloadCredentialsUpdateType(), AuthorizationResourceAction.DESCRIBE_ENVIRONMENT);
return checkOperationRejected(operationToSyncOperationStatus.convert(syncOperation));
}
Aggregations