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

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

Merged
dbkr merged 35 commits into
developfrom
dbkr/terms
Jul 23, 2019
Merged

dbkr merged 35 commits into
developfrom
dbkr/terms

Conversation

@dbkr

@dbkr dbkr commented Jul 10, 2019 •

Copy link
Copy Markdown
Member

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

@jryans jryans left a comment

Copy link
Copy Markdown
Collaborator

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".)

Comment thread src/FromWidgetPostMessageApi.js
Comment thread src/Terms.js Outdated
Comment thread src/Terms.js Outdated
Comment thread src/Terms.js Outdated
Comment thread src/Terms.js
Comment thread src/Terms.js Outdated
Comment thread src/Terms.js Outdated
Comment thread src/components/views/dialogs/TermsDialog.js Outdated
Comment thread src/components/views/dialogs/TermsDialog.js Outdated
Comment thread src/components/views/settings/IntegrationsManager.js
dbkr and others added 15 commits July 10, 2019 14:17
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>

@dbkr dbkr left a comment

Copy link
Copy Markdown
Member Author

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.

Comment thread src/components/views/dialogs/TermsDialog.js Outdated
Comment thread src/Terms.js
@jryans
jryans self-requested a review July 10, 2019 15:00
Comment thread src/Terms.js Outdated
Comment thread src/Terms.js
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
@jryans
jryans self-requested a review July 10, 2019 15:09

@jryans jryans left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for working this! 😁

Comment thread src/components/views/dialogs/TermsDialog.js Outdated
Comment thread src/components/views/dialogs/TermsDialog.js Outdated
Comment thread src/ScalarAuthClient.js
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
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Also add a test to make sure it does it
@dbkr
dbkr requested a review from turt2live July 11, 2019 15:18

@jryans jryans left a comment

Copy link
Copy Markdown
Collaborator

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! 😁

Comment thread src/Terms.js Outdated
Comment thread src/Terms.js Outdated
Comment thread src/components/views/dialogs/TermsDialog.js Outdated
dbkr and others added 3 commits July 22, 2019 12:23
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
Co-Authored-By: J. Ryan Stinnett <jryans@gmail.com>
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.

@turt2live turt2live left a comment

Copy link
Copy Markdown
Member

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 :)

@jryans jryans left a comment

Copy link
Copy Markdown
Collaborator

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!

Comment thread src/ScalarAuthClient.js
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