Skip to content

Commit 8890b4a

Browse files
authored
Merge pull request #1204 from oncokb/feat/flag-country-approval
flag when registered users are from country oncokb licensing not supp…
2 parents da4a25c + d03f47b commit 8890b4a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/main/java/org/mskcc/cbio/oncokb/service/SlackService.java

+7
Original file line numberDiff line numberDiff line change
@@ -610,6 +610,13 @@ private List<LayoutBlock> buildAdditionalInfoBlocks(UserDTO userDTO, boolean tri
610610
layoutBlocks.add(buildPlainTextBlock(rejectOption.getExpandedNote(), rejectOption.getBlockId()));
611611
}
612612
}
613+
614+
615+
if ((userDTO.getEmail() != null && userDTO.getEmail().endsWith(".ir"))
616+
|| (userDTO.getCountry() != null && userDTO.getCountry().toLowerCase().equals("iran")))
617+
{
618+
layoutBlocks.add(buildMarkdownBlock(":nerd_alert: *This user may be from Iran. OncoKB cannot be licensed to users in Iran.*", COUNTRY_WARNING));
619+
}
613620

614621
List<UserDTO> potentialDuplicateUsers = userService.getPotentialDuplicateAccountsByUser(userDTO);
615622
if (!potentialDuplicateUsers.isEmpty()) {

src/main/java/org/mskcc/cbio/oncokb/web/rest/slack/BlockId.java

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public enum BlockId {
2626
, SUBJECT_INPUT("subject-input")
2727
, BODY_INPUT("body-input")
2828
, API_ACCESS("api-access")
29+
, COUNTRY_WARNING("country-warning")
2930
;
3031

3132
String id;

0 commit comments

Comments
 (0)