Skip to content

Add anonymize user action#91

Merged
gtrkiller merged 9 commits into
mainfrom
anonymize_user
Nov 3, 2023
Merged

Add anonymize user action#91
gtrkiller merged 9 commits into
mainfrom
anonymize_user

Conversation

@gtrkiller

@gtrkiller gtrkiller commented Oct 31, 2023

Copy link
Copy Markdown
Contributor

Overview

Add an action to deactivate/anonymize users.

Rationale

GDPR compliance

Juju Events Changes

N/A

Module Changes

N/A

Library Changes

N/A

Checklist

Screenshot before and after anonymization:
Screenshot from 2023-11-01 14-52-43
Screenshot from 2023-11-01 14-53-29

@gtrkiller gtrkiller requested a review from a team as a code owner October 31, 2023 19:16
Comment thread tests/integration/test_charm.py
yanksyoon
yanksyoon previously approved these changes Nov 1, 2023

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool! Minor comments!

Comment thread actions.yaml Outdated
Comment thread src/charm.py Outdated
Comment thread src/charm.py Outdated
Comment thread tests/integration/test_charm.py Outdated
Comment thread tests/integration/test_charm.py Outdated
Comment thread tests/integration/test_charm.py Outdated
Comment thread docs/tutorial/getting-started.md
Comment thread src/charm.py Outdated
@amandahla

Copy link
Copy Markdown
Contributor

Is it possible to add a screenshot to the PR of how it will look after a user is anonymized?
"It can also mark the user as GDPR-erased. This means messages sent by the user will still be visible by anyone that was in the room when these messages were sent, but hidden from users joining the room afterwards."

yanksyoon
yanksyoon previously approved these changes Nov 2, 2023

@yanksyoon yanksyoon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread actions.yaml Outdated
@github-actions

github-actions Bot commented Nov 3, 2023

Copy link
Copy Markdown
Contributor

Test coverage for 1086ead

Name                            Stmts   Miss Branch BrPart  Cover   Missing
---------------------------------------------------------------------------
src/actions/__init__.py             3      0      0      0   100%
src/actions/register_user.py       22      0      2      0   100%
src/actions/reset_instance.py      21      0      2      0   100%
src/charm.py                      196      8     36      4    95%   125-126, 178-179, 198-199, 240, 254
src/charm_state.py                 64      1     12      1    97%   141
src/charm_types.py                 11      0      0      0   100%
src/database_client.py             53      1     10      3    94%   35, 47->exit, 69->exit
src/database_observer.py           54      4      6      0    93%   70-72, 88
src/exceptions.py                   4      0      0      0   100%
src/mjolnir.py                     76      8     20      2    88%   60-64, 73, 93-96
src/observability.py                9      0      0      0   100%
src/pebble.py                      77     10      6      3    84%   90-91, 93, 95, 109-114
src/saml_observer.py               45      1      8      0    98%   64
src/synapse/__init__.py             3      0      0      0   100%
src/synapse/api.py                161      2     22      2    98%   207, 376
src/synapse/workload.py           200      6     30      5    95%   361-362, 378, 427->430, 476, 478, 483
src/user.py                        24      0      4      0   100%
---------------------------------------------------------------------------
TOTAL                            1023     41    158     20    95%

Static code analysis report

Run started:2023-11-03 12:47:49.174524

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 5235
  Total lines skipped (#nosec): 4
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 0

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@amandahla amandahla left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@arturo-seijas arturo-seijas left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@gtrkiller gtrkiller merged commit 66fa641 into main Nov 3, 2023
@gtrkiller gtrkiller deleted the anonymize_user branch November 3, 2023 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants