Skip to content

Commit

Permalink
Scheduled surveys cant be viewed by unauthorised (#1990)
Browse files Browse the repository at this point in the history
  • Loading branch information
saravanpa-aot authored Aug 10, 2023
1 parent 1e8f36f commit b0efba5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions met-api/src/met_api/models/survey.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ def _filter_accessible_surveys(query, assigned_engagements: list[int]):
filter_conditions = [
# Exclude draft engagements that the user is not assigned to
Engagement.status_id != Status.Draft.value,
# Scheduled surveys are still not viewable
Engagement.status_id != Status.Scheduled.value,
# Include all assigned engagements even if its draft
Engagement.id.in_(assigned_engagements),
# Include Un-linked surveys
Expand Down

0 comments on commit b0efba5

Please sign in to comment.