class UserManagementController extends AsyncAdaptor {

    @PreAuthorize("hasAnyAuthority('ifs_administrator', 'support')")
    @SecuredBySpring(value = "UserManagementController.reactivateUser() method",
            description = "IFS admins and support users can reactivate users.")
    @PostMapping(value = "/user/{userId}/inactive", params = "reactivateUser")
    public String reactivateUser(@PathVariable long userId) {
        return userRestService.retrieveUserById(userId).andOnSuccess(user ->
                userRestService.reactivateUser(userId)
                        .andOnSuccessReturn(p -> redirectToActivePage(userId)))
                .getSuccess();
    }

}