Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
synapse
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Maunium
synapse
Commits
7d47cc13
Commit
7d47cc13
authored
6 years ago
by
Erik Johnston
Browse files
Options
Downloads
Patches
Plain Diff
Move requester check into assert_accepted_privacy_policy
parent
30e69ff9
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
synapse/handlers/message.py
+8
-5
8 additions, 5 deletions
synapse/handlers/message.py
with
8 additions
and
5 deletions
synapse/handlers/message.py
+
8
−
5
View file @
7d47cc13
...
...
@@ -316,12 +316,8 @@ class EventCreationHandler(object):
target
,
e
)
# Check if the user has accepted the privacy policy. We only do this if
# the requester has an associated access_token_id, which indicates that
# this action came from a user request rather than an automatice server
# or admin action.
is_exempt
=
yield
self
.
_is_exempt_from_privacy_policy
(
builder
,
requester
)
if
requester
.
access_token_id
and
not
is_exempt
:
if
not
is_exempt
:
yield
self
.
assert_accepted_privacy_policy
(
requester
)
if
token_id
is
not
None
:
...
...
@@ -396,6 +392,13 @@ class EventCreationHandler(object):
if
requester
.
app_service
is
not
None
:
return
# Check if the user has accepted the privacy policy. We only do this if
# the requester has an associated access_token_id, which indicates that
# this action came from a user request rather than an automatice server
# or admin action.
if
requester
.
access_token_id
is
None
:
return
user_id
=
requester
.
user
.
to_string
()
# exempt the system notices user
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment