Skip to content
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

SWC-7194 #5589

Merged
merged 2 commits into from
Nov 25, 2024
Merged

SWC-7194 #5589

merged 2 commits into from
Nov 25, 2024

Conversation

jay-hodgson
Copy link
Member

No description provided.

@@ -352,10 +352,7 @@ public void onError(Throwable caught) {
headerWidget.configure();
if (caught instanceof NotFoundException) {
show404();
} else if (
caught instanceof ForbiddenException &&
authenticationController.isLoggedIn()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously, if anonymous it would call StuAlert handleException() which passed in null for the entity ID (and version). Now, we always call show403(entityId, versionNumber), but only show the open invitations if you are logged in (see show403() in this class).

if (entityId != null) {
synAlert.show403(entityId, versionNumber);
}
synAlert.show403(entityId, versionNumber);
Copy link
Contributor

@nickgros nickgros Nov 25, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this work ok if the entity ID is nonsense, like if the place is Synapse:notASynId? Just wondering if the null check is relevant to parsing the place token

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works with an invalid synapse ID place token (we do attempt to get the DOI information, which results in a 400, but this does not impact the UI).

@jay-hodgson jay-hodgson merged commit 7fc9048 into Sage-Bionetworks:develop Nov 25, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants