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

Reject attempts to send event before privacy consent is given #3257

Merged
merged 1 commit into from
May 22, 2018

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented May 22, 2018

Returns an M_CONSENT_NOT_GIVEN error if consent is not yet given.

Builds on top of #3236.

Copy link
Member

@erikjohnston erikjohnston left a comment

Choose a reason for hiding this comment

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

Broadly LGTM, pending the base PR being approved.

membership = builder.content.get("membership", None)
if membership == Membership.JOIN:
return self._is_server_notices_room(builder.room_id)
return succeed(False)
Copy link
Member

Choose a reason for hiding this comment

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

Do we not want to exempt AS users?

Copy link
Member

Choose a reason for hiding this comment

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

Oh, yo do that later. I'm not sure I really get the difference between the checks here and the checks later

Copy link
Member Author

Choose a reason for hiding this comment

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

well, it's a difference between "does this action require consent to the privacy policy?" and "does this user need to consent to the privacy policy?".

the distinction means that it is meaningful to call assert_accepted_privacy_policy from the RoomCreationHandler, where we have already established that the action requires consent, but not whether the user needs to do so.

Raises:
ConsentNotGivenError: if the user has not given consent yet
"""
logger.info("Consent for %s", requester.user)
Copy link
Member

Choose a reason for hiding this comment

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

Should this really be info?

Copy link
Member Author

Choose a reason for hiding this comment

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

no.

@richvdh richvdh force-pushed the rav/fonx_on_no_consent branch from 7c682b8 to f82437f Compare May 22, 2018 10:55
@richvdh richvdh force-pushed the rav/fonx_on_no_consent branch from f82437f to a5e2941 Compare May 22, 2018 11:00
@richvdh richvdh merged commit 3b2def6 into develop May 22, 2018
@richvdh richvdh deleted the rav/fonx_on_no_consent branch May 22, 2018 12:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants