Skip to content

Commit

Permalink
Added audit log when adding coowner to a project.
Browse files Browse the repository at this point in the history
  • Loading branch information
kbecker42 committed Aug 3, 2022
1 parent fdef85f commit a9a0b14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pybossa/view/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -3185,6 +3185,8 @@ def coowners(short_name):
old_list = project.owners_ids or []
new_list = [int(x) for x in json.loads(request.data).get('coowners') or []]
overlap_list = [value for value in old_list if value in new_list]
auditlogger.log_event(project, current_user, 'update', 'project.coowners',
old_list, new_list)
# delete ids that don't exist anymore
delete = [value for value in old_list if value not in overlap_list]
for _id in delete:
Expand Down

0 comments on commit a9a0b14

Please sign in to comment.