Skip to content

Commit

Permalink
Add additional explanation to conditional statement
Browse files Browse the repository at this point in the history
  • Loading branch information
TakumiMiyazawaAbel committed Feb 13, 2025
1 parent cc2528f commit b660b18
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ckanext/feedback/controllers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ def approval_and_delete():
'feedback.approval-and-delete'
)

# If user is organization admin
owner_orgs = None
if not current_user.sysadmin:
# If the user is not a sysadmin, feedbacks for the organization groups
# the user is an admin of will be retrieved.
owner_orgs = current_user.get_group_ids(
group_type='organization', capacity='admin'
)
Expand All @@ -112,6 +113,8 @@ def approval_and_delete():
offset=offset,
)
else:
# If the user is a sysadmin, all feedbacks
# will be retrieved regardless of group affiliation.
feedbacks, total_count = feedback_service.get_feedbacks(
active_filters=active_filters, sort=sort, limit=limit, offset=offset
)
Expand Down

0 comments on commit b660b18

Please sign in to comment.