-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Reject attempts to send event before privacy consent is given #3257
Conversation
4761bc6
to
0eff55d
Compare
There was a problem hiding this 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
synapse/handlers/message.py
Outdated
Raises: | ||
ConsentNotGivenError: if the user has not given consent yet | ||
""" | ||
logger.info("Consent for %s", requester.user) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no.
7c682b8
to
f82437f
Compare
Returns an M_CONSENT_NOT_GIVEN error (cf https://github.com/matrix-org/matrix-doc/issues/1252) if consent is not yet given.
f82437f
to
a5e2941
Compare
Returns an M_CONSENT_NOT_GIVEN error if consent is not yet given.
Builds on top of #3236.