Skip to content

Commit

Permalink
SWC-7194
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-hodgson committed Nov 25, 2024
1 parent 3650c8c commit 5155e5c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,7 @@ public void onError(Throwable caught) {
headerWidget.configure();
if (caught instanceof NotFoundException) {
show404();
} else if (
caught instanceof ForbiddenException &&
authenticationController.isLoggedIn()
) {
} else if (caught instanceof ForbiddenException) {
show403();
} else {
view.clear();
Expand All @@ -364,35 +361,35 @@ public void onError(Throwable caught) {
}

public void show403() {
if (entityId != null) {
synAlert.show403(entityId, versionNumber);
}
synAlert.show403(entityId, versionNumber);
view.setLoadingVisible(false);
view.setEntityPageTopVisible(false);
// also add the open team invitations widget (accepting may gain access to this project)
openTeamInvitesWidget.configure(
new Callback() {
@Override
public void invoke() {
// when team is updated, refresh to see if we can now access
refresh();
}
},
new CallbackP<List<OpenUserInvitationBundle>>() {
@Override
public void invoke(List<OpenUserInvitationBundle> invites) {
// if there are any, then also add the title text to the panel
if (invites != null && invites.size() > 0) {
view.setAccessDependentMessageVisible(true);
if (authenticationController.isLoggedIn()) {
// also add the open team invitations widget (accepting may gain access to this project)
openTeamInvitesWidget.configure(
new Callback() {
@Override
public void invoke() {
// when team is updated, refresh to see if we can now access
refresh();
}
},
new CallbackP<List<OpenUserInvitationBundle>>() {
@Override
public void invoke(List<OpenUserInvitationBundle> invites) {
// if there are any, then also add the title text to the panel
if (invites != null && invites.size() > 0) {
view.setAccessDependentMessageVisible(true);
}
}
}
}
);
view.setOpenTeamInvitesVisible(true);
);
view.setOpenTeamInvitesVisible(true);
}
}

public void show404() {
synAlert.show404();
synAlert.show404(entityId, versionNumber);
view.setLoadingVisible(false);
view.setEntityPageTopVisible(false);
view.setOpenTeamInvitesVisible(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ public void clear() {
entityVersion = null;
}

public void show403() {
show403(null, null);
}

public void show403(String entityId, Long entityVersion) {
clear();
this.entityId = entityId;
Expand Down

0 comments on commit 5155e5c

Please sign in to comment.