Skip to content
Snippets Groups Projects
Commit 7d47cc13 authored by Erik Johnston's avatar Erik Johnston
Browse files

Move requester check into assert_accepted_privacy_policy

parent 30e69ff9
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment