Search in sources :

Example 1 with BlockscoreIdVerificationStatus

use of org.pmiops.workbench.model.BlockscoreIdVerificationStatus in project workbench by all-of-us.

the class ProfileController method reviewIdVerification.

@Override
@AuthorityRequired({ Authority.REVIEW_ID_VERIFICATION })
public ResponseEntity<IdVerificationListResponse> reviewIdVerification(Long userId, IdVerificationReviewRequest review) {
    BlockscoreIdVerificationStatus status = review.getNewStatus();
    Boolean oldVerification = userDao.findUserByUserId(userId).getBlockscoreVerificationIsValid();
    String newValue;
    if (status == BlockscoreIdVerificationStatus.VERIFIED) {
        userService.setIdVerificationApproved(userId, true);
        newValue = "true";
    } else {
        userService.setIdVerificationApproved(userId, false);
        newValue = "false";
    }
    userService.logAdminUserAction(userId, "manual ID verification", oldVerification, newValue);
    return getIdVerificationsForReview();
}
Also used : BlockscoreIdVerificationStatus(org.pmiops.workbench.model.BlockscoreIdVerificationStatus) AuthorityRequired(org.pmiops.workbench.annotations.AuthorityRequired)

Aggregations

AuthorityRequired (org.pmiops.workbench.annotations.AuthorityRequired)1 BlockscoreIdVerificationStatus (org.pmiops.workbench.model.BlockscoreIdVerificationStatus)1