Show More
@@ -464,6 +464,7 b' def add_user_to_user_group(request, apiu' | |||
|
464 | 464 | raise JSONRPCError('user group `%s` does not exist' % ( |
|
465 | 465 | usergroupid,)) |
|
466 | 466 | |
|
467 | old_values = user_group.get_api_data() | |
|
467 | 468 | try: |
|
468 | 469 | ugm = UserGroupModel().add_user_to_group(user_group, user) |
|
469 | 470 | success = True if ugm is not True else False |
@@ -474,7 +475,8 b' def add_user_to_user_group(request, apiu' | |||
|
474 | 475 | if success: |
|
475 | 476 | user_data = user.get_api_data() |
|
476 | 477 | audit_logger.store_api( |
|
477 |
'user_group.edit.member.add', |
|
|
478 | 'user_group.edit.member.add', | |
|
479 | action_data={'user': user_data, 'old_data': old_values}, | |
|
478 | 480 | user=apiuser) |
|
479 | 481 | |
|
480 | 482 | Session().commit() |
@@ -534,6 +536,7 b' def remove_user_from_user_group(request,' | |||
|
534 | 536 | raise JSONRPCError( |
|
535 | 537 | 'user group `%s` does not exist' % (usergroupid,)) |
|
536 | 538 | |
|
539 | old_values = user_group.get_api_data() | |
|
537 | 540 | try: |
|
538 | 541 | success = UserGroupModel().remove_user_from_group(user_group, user) |
|
539 | 542 | msg = 'removed member `%s` from user group `%s`' % ( |
@@ -543,7 +546,8 b' def remove_user_from_user_group(request,' | |||
|
543 | 546 | if success: |
|
544 | 547 | user_data = user.get_api_data() |
|
545 | 548 | audit_logger.store_api( |
|
546 |
'user_group.edit.member.delete', |
|
|
549 | 'user_group.edit.member.delete', | |
|
550 | action_data={'user': user_data, 'old_data': old_values}, | |
|
547 | 551 | user=apiuser) |
|
548 | 552 | |
|
549 | 553 | Session().commit() |
General Comments 0
You need to be logged in to leave comments.
Login now