-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add all annotated variants download button to api access page #1208
Conversation
@@ -82,6 +82,21 @@ const DownloadButtonGroups: React.FunctionComponent<{ | |||
buttonText="Cancer Gene List" | |||
/> | |||
) : null} | |||
{props.data.hasAllAnnotatedVariants && ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we check if the user's authority list includes ROLE_PREMIUM_API? I think currently, the button is visible to ROLE_DATA_DOWNLOAD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want the user to have both ROLE_DATA_DOWNLOAD and ROLE_PREMIUM_API?
I think if ROLE_PREMIUM_API supersedes ROLE_DATA_DOWNLOAD we can probably add the private endpoints to role PREMIUM_API, right? Or maybe we want to open up allAnnotatedVariants and allActionableVariants to ROLE_DATA_DOWNLOAD. Seems weird to me that we would allow someone to download the entire data dump but not the full list of annotated variants.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that data download role should give you access to the annotated variants files since we already give them the SQL dump with this role. Can you just update so that if the user has data download or is a premium user, then show the data download section. You don't need to explicitly check if premium user for allActionable and allAnnotated file buttons. (
oncokb-public/src/main/webapp/app/pages/apiAccessGroup/APIAccessPage.tsx
Lines 291 to 293 in 1fc4dd5
this.props.authenticationStore.account.authorities.includes( | |
USER_AUTHORITY.ROLE_DATA_DOWNLOAD | |
) ? ( |
}} | ||
buttonText="All Annotated Variants" | ||
/> | ||
)} | ||
{props.data.hasAllActionableVariants ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be checking props.data.hasSqlDump right? I think someone had a typo here before.
@@ -82,6 +82,21 @@ const DownloadButtonGroups: React.FunctionComponent<{ | |||
buttonText="Cancer Gene List" | |||
/> | |||
) : null} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we also include allActionableVariantsTxt as well. We sometimes get that request too and should be quick to add?
(this.props.authenticationStore.account.authorities.includes( | ||
USER_AUTHORITY.ROLE_DATA_DOWNLOAD | ||
) ? ( | ||
) || | ||
this.props.authenticationStore.account.authorities.includes( | ||
USER_AUTHORITY.ROLE_PREMIUM_USER | ||
)) ? ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we just check .includes(RoleA, RoleB)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used .some()
@@ -52,6 +52,7 @@ function getMinorVersion(versionString: string): number | undefined { | |||
const BUTTON_CLASS_NAME = 'mr-2 my-1'; | |||
const DownloadButtonGroups: React.FunctionComponent<{ | |||
data: DownloadAvailabilityWithDate; | |||
authenticationStore: AuthenticationStore; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed anymore?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my bad, thought I removed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
resolves https://github.com/oncokb/oncokb-pipeline/issues/665