Skip to content

feat: Implement API to GDPR delete users#3224

Merged
Janis4411 merged 1 commit intomainfrom
jv/SODEV-2997-Implement-API-to-GDPR-delete-users
Apr 24, 2026
Merged

feat: Implement API to GDPR delete users#3224
Janis4411 merged 1 commit intomainfrom
jv/SODEV-2997-Implement-API-to-GDPR-delete-users

Conversation

@Janis4411
Copy link
Copy Markdown
Contributor

This PR introduces a possible way to GDPR delete users via a API.

If we delete a user on openHPI we also have to delete the user on codeocean. Previously this was handled via a rake task that has to be triggered manually.

Part of SODEV-2997

@Janis4411 Janis4411 requested a review from arkirchner April 16, 2026 13:25
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 85f5e83 to 4c3c10a Compare April 16, 2026 13:26
Comment thread app/controllers/api/internal/users/deletions_controller.rb Fixed
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/jobs/user_cleanup_job.rb Outdated
@Janis4411 Janis4411 marked this pull request as draft April 16, 2026 13:34
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

❌ Patch coverage is 89.47368% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.39%. Comparing base (7876111) to head (e374290).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
lib/tasks/gdpr_delete.rake 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3224      +/-   ##
==========================================
+ Coverage   70.33%   70.39%   +0.06%     
==========================================
  Files         214      216       +2     
  Lines        6839     6857      +18     
==========================================
+ Hits         4810     4827      +17     
- Misses       2029     2030       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 3 times, most recently from 3238780 to 9988915 Compare April 20, 2026 07:57
Comment thread app/controllers/api/api_controller.rb Fixed
Comment thread app/controllers/api/api_controller.rb Fixed
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 9988915 to cb82a61 Compare April 20, 2026 08:23
@Janis4411 Janis4411 self-assigned this Apr 20, 2026
@Janis4411 Janis4411 marked this pull request as ready for review April 20, 2026 09:53
Comment thread app/jobs/user_cleanup_job.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/controllers/api/api_controller.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/jobs/user_cleanup_job.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from cb82a61 to b7bfbd7 Compare April 20, 2026 11:57
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 2 times, most recently from 62fa41c to 014d4d7 Compare April 21, 2026 07:14
Comment thread app/models/external_user.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
Comment thread spec/request/api/internal/users/deletions_spec.rb Outdated
Comment thread spec/request/api/internal/users/destroy_spec.rb
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 014d4d7 to 667a61b Compare April 21, 2026 09:27
Comment thread lib/tasks/gdpr_delete.rake Outdated
Comment thread app/controllers/api/internal/users/deletions_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 667a61b to 37a665c Compare April 21, 2026 12:03
Comment thread config/routes.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 2 times, most recently from 1b514dc to 71bbf3d Compare April 21, 2026 12:37
Comment thread app/controllers/api/internal/users_controller.rb Outdated
Comment thread app/controllers/api/internal/users_controller.rb Outdated
Comment thread config/routes.rb Outdated
Comment thread app/controllers/api/internal/users_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 71bbf3d to 142fae9 Compare April 21, 2026 13:14
Comment thread app/controllers/api/internal/users_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 142fae9 to 79b8847 Compare April 21, 2026 13:55
Comment thread app/controllers/api/internal/users_controller.rb
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 3 times, most recently from 4f7469b to 4379562 Compare April 21, 2026 15:33
Comment thread app/controllers/api/api_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 4379562 to 29ef0d1 Compare April 21, 2026 15:53
Comment thread app/controllers/api/api_controller.rb Outdated
Comment thread app/controllers/api/api_controller.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 2 times, most recently from a30b4f7 to 1d4b374 Compare April 23, 2026 07:16
Comment thread spec/controllers/api/api_controller_spec.rb
Comment thread spec/request/api/internal/users/destroy_spec.rb Outdated
Comment thread spec/controllers/api/api_controller_spec.rb
Comment thread spec/controllers/api/internal/users_controller_spec.rb Outdated
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch 2 times, most recently from a20f90c to 297a428 Compare April 23, 2026 10:22
Copy link
Copy Markdown
Contributor

@arkirchner arkirchner left a comment

Choose a reason for hiding this comment

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

Please fix CI issues before merging.

Thank you very much.

This is a possible way to GDPR delete users via a API. The background
is that if we delete a user on openhpi we also want to delete the user
on codeocean.

Part of SODEV-2997
@Janis4411 Janis4411 force-pushed the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch from 297a428 to e374290 Compare April 24, 2026 07:04
@Janis4411 Janis4411 merged commit 75aaf63 into main Apr 24, 2026
15 checks passed
@Janis4411 Janis4411 deleted the jv/SODEV-2997-Implement-API-to-GDPR-delete-users branch April 24, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants