-
-
Notifications
You must be signed in to change notification settings - Fork 806
Labels
bugtriagetickets that need to be looked at before assigning to team memberstickets that need to be looked at before assigning to team members
Description
Describe the bug
If user does not have a DAT and goes to Download Access Token, it raises a 500 internal server error.
To Reproduce
Steps to reproduce the behavior:
Setup a new system with oAuth2 login.
Configure dat.method = Uuid.
User logs in and select Data Access Token in dropdown.
User clicks "Download token".
It opens a new page with error.
Expected behavior
If not DAT exists, it should create one and share it with user.
Additional context
https://github.com/cBioPortal/cbioportal/blob/master/src/main/java/org/cbioportal/legacy/service/impl/UuidDataAccessTokenServiceImpl.java#L102
public DataAccessToken getDataAccessToken(String username) {
List<DataAccessToken> allDataAccessTokens =
dataAccessTokenRepository.getAllDataAccessTokensForUsername(username);
DataAccessToken newestDataAccessToken = allDataAccessTokens.get(allDataAccessTokens.size() - 1);
return newestDataAccessToken;
}
It does not check if allDataAccessTokens len is 0.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugtriagetickets that need to be looked at before assigning to team memberstickets that need to be looked at before assigning to team members