Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add anonymize user action #91

Merged
merged 9 commits into from
Nov 3, 2023
Merged

Add anonymize user action #91

merged 9 commits into from
Nov 3, 2023

Conversation

gtrkiller
Copy link
Contributor

@gtrkiller gtrkiller commented Oct 31, 2023

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
yanksyoon
yanksyoon previously approved these changes Nov 1, 2023
Copy link
Contributor

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

Very cool! Minor comments!

actions.yaml Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
tests/integration/test_charm.py Outdated Show resolved Hide resolved
docs/tutorial/getting-started.md Show resolved Hide resolved
src/charm.py Outdated Show resolved Hide resolved
@amandahla
Copy link
Collaborator

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
Copy link
Contributor

@yanksyoon yanksyoon left a comment

Choose a reason for hiding this comment

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

LGTM!

actions.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Nov 3, 2023

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):

Copy link
Collaborator

@amandahla amandahla left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@arturo-seijas arturo-seijas left a comment

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
20 checks passed
@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