Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

ToS for ISes/IMs: prompt on use screen #3199

Merged
merged 35 commits into from
Jul 23, 2019
Merged

ToS for ISes/IMs: prompt on use screen #3199

merged 35 commits into from
Jul 23, 2019

Conversation

dbkr
Copy link
Member

@dbkr dbkr commented Jul 10, 2019

Implements the prompt when a user tries to contact the integration manager and receives M_TERMS_NOT_SIGNED

Implements MSC2140

If an IM refuses to load a widget (inc. sticker picker) with M_TERMS_NOT_SIGNED, this is not handled by this code (the widget will just display the error page).

Also does a little refactoring: ScalarAuthClient's method are now (hopefully) clearer and IntegrationsManager has and the logic pulled out of it and is now stateless (sorry these aren't in a separate PR).

Requires matrix-org/matrix-js-sdk#988
Fixes element-hq/element-web#6802
Fixes element-hq/element-web#10088

@dbkr dbkr requested a review from jryans July 10, 2019 10:00
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks, this seems like good progress! 😁

This doesn't fully fix element-hq/element-web#10088, does it? (I assumed that was the issue I am about to start...) Assuming it does not, please edit the top comment so the PR doesn't auto-close that issue. (Maybe just say "Part of" instead of "Fixes".)

src/FromWidgetPostMessageApi.js Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
Copy link
Member Author

@dbkr dbkr left a comment

Choose a reason for hiding this comment

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

Thanks for picking that lot up! Ready for another look I think.

src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
src/Terms.js Show resolved Hide resolved
@jryans jryans self-requested a review July 10, 2019 15:00
src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Show resolved Hide resolved
Co-Authored-By: J. Ryan Stinnett <[email protected]>
@jryans jryans self-requested a review July 10, 2019 15:09
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Thanks for working this! 😁

src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
src/ScalarAuthClient.js Show resolved Hide resolved
To remember what policies the user has agreed to
@dbkr dbkr requested a review from jryans July 11, 2019 13:45
dbkr and others added 4 commits July 11, 2019 14:46
@dbkr dbkr requested a review from turt2live July 11, 2019 15:18
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

Looks great overall, thanks for working on this! 😁

src/Terms.js Outdated Show resolved Hide resolved
src/Terms.js Outdated Show resolved Hide resolved
src/components/views/dialogs/TermsDialog.js Outdated Show resolved Hide resolved
dbkr and others added 3 commits July 22, 2019 12:23
Co-Authored-By: J. Ryan Stinnett <[email protected]>
Co-Authored-By: J. Ryan Stinnett <[email protected]>
before passing to js-sdk. We continue to use the full URL for the
calls done by matrix-react-sdk, but the standard terms API called
by the js-sdk lives on the standard _matrix path. This means we
don't support running IMs on a non-root path, but it's the only
realistic way of transitioning to _matrix paths since configs in
the wild contain bits of the API path.

Once we've fully transitioned to _matrix URLs, we can give people
a grace period to update their configs, then use the rest url as
a regular base url.
Copy link
Member

@turt2live turt2live left a comment

Choose a reason for hiding this comment

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

works great from a Dimension perspective (thank you!). Looking forward to testing this against scalar-staging when that's available :)

Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

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

New changes look good to me as well! 😁 A small note for future readers, but otherwise looks good to merge!

src/ScalarAuthClient.js Show resolved Hide resolved
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
3 participants