Skip to content

Commit

Permalink
Merge pull request #1204 from oncokb/feat/flag-country-approval
Browse files Browse the repository at this point in the history
flag when registered users are from country oncokb licensing not supp…
  • Loading branch information
bprize15 authored Feb 27, 2025
2 parents da4a25c + d03f47b commit 8890b4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/org/mskcc/cbio/oncokb/service/SlackService.java
Original file line number Diff line number Diff line change
Expand Up @@ -610,6 +610,13 @@ private List<LayoutBlock> buildAdditionalInfoBlocks(UserDTO userDTO, boolean tri
layoutBlocks.add(buildPlainTextBlock(rejectOption.getExpandedNote(), rejectOption.getBlockId()));
}
}


if ((userDTO.getEmail() != null && userDTO.getEmail().endsWith(".ir"))
|| (userDTO.getCountry() != null && userDTO.getCountry().toLowerCase().equals("iran")))
{
layoutBlocks.add(buildMarkdownBlock(":nerd_alert: *This user may be from Iran. OncoKB cannot be licensed to users in Iran.*", COUNTRY_WARNING));
}

List<UserDTO> potentialDuplicateUsers = userService.getPotentialDuplicateAccountsByUser(userDTO);
if (!potentialDuplicateUsers.isEmpty()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public enum BlockId {
, SUBJECT_INPUT("subject-input")
, BODY_INPUT("body-input")
, API_ACCESS("api-access")
, COUNTRY_WARNING("country-warning")
;

String id;
Expand Down

0 comments on commit 8890b4a

Please sign in to comment.