Skip to content

Commit

Permalink
Merge pull request #5420 from Sage-Bionetworks/release-502
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgros committed Jun 10, 2024
2 parents dbd947a + 92e81a5 commit 5e1da22
Show file tree
Hide file tree
Showing 55 changed files with 413 additions and 5,692 deletions.
19 changes: 0 additions & 19 deletions e2e/account.spec.ts

This file was deleted.

19 changes: 0 additions & 19 deletions e2e/create_account.spec.ts

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"react-transition-group": "2.6.0",
"sass": "^1.63.6",
"spark-md5": "^3.0.2",
"synapse-react-client": "3.2.19",
"synapse-react-client": "3.2.20",
"universal-cookie": "^4.0.4",
"xss": "^1.0.15"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
import org.sagebionetworks.web.client.presenter.ProfilePresenter;
import org.sagebionetworks.web.client.presenter.QuizPresenter;
import org.sagebionetworks.web.client.presenter.SearchPresenter;
import org.sagebionetworks.web.client.presenter.SettingsPresenter;
import org.sagebionetworks.web.client.presenter.SignedTokenPresenter;
import org.sagebionetworks.web.client.presenter.SubscriptionPresenter;
import org.sagebionetworks.web.client.presenter.SynapseForumPresenter;
Expand Down Expand Up @@ -185,7 +184,7 @@
import org.sagebionetworks.web.client.widget.lazyload.LazyLoadWikiWidgetWrapper;
import org.sagebionetworks.web.client.widget.login.LoginWidget;
import org.sagebionetworks.web.client.widget.profile.ProfileCertifiedValidatedWidget;
import org.sagebionetworks.web.client.widget.profile.UserProfileEditorWidget;
import org.sagebionetworks.web.client.widget.profile.UserProfileWidget;
import org.sagebionetworks.web.client.widget.provenance.v2.ProvenanceWidget;
import org.sagebionetworks.web.client.widget.refresh.DiscussionThreadCountAlert;
import org.sagebionetworks.web.client.widget.refresh.EntityRefreshAlert;
Expand Down Expand Up @@ -685,8 +684,6 @@ public interface PortalGinInjector extends Ginjector {

QueryTokenProvider getQueryTokenProvider();

SettingsPresenter getSettingsPresenter();

PersonalAccessTokensPresenter getPersonalAccessTokensPresenter();

AccessControlListModalWidget getAccessControlListModalWidget();
Expand Down Expand Up @@ -785,7 +782,7 @@ public interface PortalGinInjector extends Ginjector {

CopyTextModal getCopyTextModal();

UserProfileEditorWidget getUserProfileEditorWidget();
UserProfileWidget getUserProfileWidget();

PromptForValuesModalView getPromptForValuesModal();

Expand Down
717 changes: 37 additions & 680 deletions src/main/java/org/sagebionetworks/web/client/PortalGinModule.java

Large diffs are not rendered by default.

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/java/org/sagebionetworks/web/client/jsinterop/SRC.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ public static class SynapseComponents {
public static ReactComponentType<
EvaluationEditorPageProps
> EvaluationEditorPage;
public static ReactComponentType<AccessTokenPageProps> AccessTokenPage;
public static ReactComponentType<DownloadCartPageProps> DownloadCartPage;
public static ReactComponentType<
DownloadConfirmationProps
Expand Down Expand Up @@ -80,15 +79,6 @@ public static class SynapseComponents {
public static ReactComponentType<
CreatedByModifiedByProps
> CreatedByModifiedBy;
public static ReactComponentType<
TwoFactorAuthSettingsPanelProps
> TwoFactorAuthSettingsPanel;
public static ReactComponentType<
TwoFactorBackupCodesProps
> TwoFactorBackupCodes;
public static ReactComponentType<
TwoFactorEnrollmentFormProps
> TwoFactorEnrollmentForm;
public static ReactComponentType<EmptyProps> SubscriptionPage;
public static ReactComponentType<
AccessRequirementListProps
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ public static enum ProfileArea {
PROJECTS,
CHALLENGES,
TEAMS,
/* The Settings area now automatically redirects to OneSage */
SETTINGS,
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,7 @@ public void onSuccess(Void result) {
view.showInfo(DisplayConstants.EMAIL_SUCCESS);
globalAppState
.getPlaceChanger()
.goTo(
new Profile(Profile.VIEW_PROFILE_TOKEN, ProfileArea.SETTINGS)
);
.goTo(new Profile(Profile.VIEW_PROFILE_TOKEN, ProfileArea.PROFILE));
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
import org.sagebionetworks.repo.model.SignedTokenInterface;
import org.sagebionetworks.repo.model.Team;
import org.sagebionetworks.repo.model.UserProfile;
import org.sagebionetworks.web.client.GlobalApplicationState;
import org.sagebionetworks.web.client.PlaceChanger;
import org.sagebionetworks.web.client.SynapseClientAsync;
import org.sagebionetworks.web.client.SynapseJavascriptClient;
import org.sagebionetworks.web.client.*;
import org.sagebionetworks.web.client.jsinterop.ToastMessageOptions;
import org.sagebionetworks.web.client.place.EmailInvitation;
import org.sagebionetworks.web.client.place.LoginPlace;
import org.sagebionetworks.web.client.place.Profile;
Expand Down Expand Up @@ -148,18 +146,19 @@ public void onFailure(Throwable t) {
view.hideLoading();
if (t instanceof ForbiddenException) {
// SWC-4721: fix message in the case where membership invitation email is not associated to the
// currently logged in user
// currently logged-in user
view.showErrorMessage(
"This invitation was sent to an email address not associated to the current user. \"" +
membershipInvitation.getInviteeEmail() +
"\" Please add this email to your Synapse account under \"Settings\", or log in with the correct Synapse account before accepting the invitation."
"\" Please add this email to your Synapse account by clicking \"Edit Profile\", or log in with the correct Synapse account before accepting the invitation."
);
// SWC-4741: invitation not associated to the current user, send user to the Settings page to add
// the new email address
// SWC-4741: invitation not associated to the current user, send user to the Profile page, where they can
// click 'Edit Profile' to get to OneSage and add the new email address
// NOTE: We don't send the user directly to OneSage so that they have a chance to read the message first
placeChanger.goTo(
new Profile(
authController.getCurrentUserPrincipalId(),
ProfileArea.SETTINGS
ProfileArea.PROFILE
)
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,36 @@
import com.google.gwt.activity.shared.AbstractActivity;
import com.google.gwt.event.shared.EventBus;
import com.google.gwt.place.shared.Place;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.AcceptsOneWidget;
import com.google.inject.Inject;
import org.sagebionetworks.web.client.GlobalApplicationState;
import org.sagebionetworks.web.client.place.PersonalAccessTokenPlace;
import org.sagebionetworks.web.client.view.PersonalAccessTokensView;
import org.sagebionetworks.web.shared.WebConstants;

public class PersonalAccessTokensPresenter
extends AbstractActivity
implements Presenter<PersonalAccessTokenPlace> {

private PersonalAccessTokensView view;
private GlobalApplicationState globalApplicationState;

@Inject
public PersonalAccessTokensPresenter(
PersonalAccessTokensView view,
GlobalApplicationState globalApplicationState
) {
this.view = view;
this.globalApplicationState = globalApplicationState;
this.view.setPresenter(this);
}

@Override
public void setPlace(PersonalAccessTokenPlace place) {
this.view.setPresenter(this);
}
public void setPlace(PersonalAccessTokenPlace place) {}

@Override
public void start(AcceptsOneWidget panel, EventBus eventBus) {
this.view.render();
panel.setWidget(view.asWidget());
Window.Location.replace(
WebConstants.ONESAGE_PRODUCTION_URL +
"/authenticated/personalaccesstokens?" +
WebConstants.ONESAGE_SYNAPSE_APPID_QUERY_PARAM
);
}

public void goTo(Place place) {
Expand Down
Loading

0 comments on commit 5e1da22

Please sign in to comment.