Factorizer/Cluster ERP WikiCluster ERP Türkçe
Home / Business modules

Module

Privacy module (privacy)

Module page for privacy, the register of data-subject requests with identity check, deadline, data export, anonymisation, and outcome.

The privacy module in src/cluster_erp/modules/privacy/ keeps the register of data-subject requests: who applied, for which right, through which channel, by when the answer is due, how the identity was checked, and how the request ended. Privacy officers and administrators use it. Its two cross-module steps, the data copy and the anonymisation, go out as EventBus events that other modules answer. The full mechanism is explained in privacy and data-subject requests.

At a glance

Item Value Source
Package src/cluster_erp/modules/privacy/ folder
Module class Module src/cluster_erp/modules/privacy/module.py:15
name / version privacy / 0.1.0 src/cluster_erp/modules/privacy/module.py:26-32
API prefix /api/v1/privacy (ModuleBase.api_prefix) src/cluster_erp/core/module_base.py:37-38
Sub-modules 1: requests folder listing
Tables 1: privacy_subject_requests src/cluster_erp/modules/privacy/requests/models.py:48
Entities in metadata 1: subject_request src/cluster_erp/modules/privacy/module.py:89
Web app presence Catalogue app privacy src/cluster_erp/modules/app_store/catalog.json (entry privacy)
Desktop presence Generic widgets only; no folder in src/cluster_erp/desktop/modules/ folder

What the module does

A request is registered when a person applies, its identity check is recorded, and then the operator answers it: by preparing a machine-readable copy of the person's data, by anonymising the person across all modules, by completing it with a note, or by rejecting it with a reason (src/cluster_erp/modules/privacy/requests/services.py:157-527). The request record stays as evidence of the answer (src/cluster_erp/modules/privacy/requests/models.py:40-46).

Sub-modules

Sub-module Purpose Main entities Router Source
requests Data-subject request register and its actions SubjectRequest /api/v1/privacy/requests src/cluster_erp/modules/privacy/requests/routes.py:28

Data model

Entity Table Key fields Notes Source
SubjectRequest privacy_subject_requests code, request_type, party_id, user_id, channel, received_at, due_at, status code unique; also identity, export, anonymisation, and outcome columns; indexes on party_id, status, due_at src/cluster_erp/modules/privacy/requests/models.py:39-85

code is a yearly business key from next_code (src/cluster_erp/modules/privacy/requests/services.py:159). The subject is always a party; user_id is set when the person also has a sign-in account (src/cluster_erp/modules/privacy/requests/models.py:42-44).

Screens and metadata

get_metadata declares a sidebar group Privacy (Turkish Gizlilik) with one list section, Data-subject Requests (Turkish İlgili Kişi Başvuruları), for the entity subject_request (src/cluster_erp/modules/privacy/module.py:52-90). Request types and channels are offered as choices in SUBJECT_REQUEST_META (src/cluster_erp/modules/privacy/requests/metadata.py:20-43).

Status and actions

Statuses are received, verified, completed, and rejected (src/cluster_erp/modules/privacy/requests/models.py:32-36).

Action Label Condition Endpoint Permission Source
verify Verify identity status is received POST /requests/{id}/actions/verify subject_request.verify src/cluster_erp/modules/privacy/requests/metadata.py:255-260, src/cluster_erp/modules/privacy/requests/routes.py:125-136
export Prepare data file status is verified POST /requests/{id}/actions/export subject_request.export src/cluster_erp/modules/privacy/requests/metadata.py:274-279, src/cluster_erp/modules/privacy/requests/routes.py:139-150
download_export Open data file export_state is ready GET /requests/{id}/export subject_request.export src/cluster_erp/modules/privacy/requests/metadata.py:281-286, src/cluster_erp/modules/privacy/requests/routes.py:153-172
anonymise Anonymise the person status is verified, erasure request POST /requests/{id}/actions/anonymise subject_request.anonymise src/cluster_erp/modules/privacy/requests/metadata.py:288-296, src/cluster_erp/modules/privacy/requests/routes.py:175-187
complete Complete status is verified POST /requests/{id}/actions/complete subject_request.complete src/cluster_erp/modules/privacy/requests/metadata.py:346-352, src/cluster_erp/modules/privacy/requests/routes.py:190-201
reject Reject status is received or verified POST /requests/{id}/actions/reject subject_request.reject src/cluster_erp/modules/privacy/requests/metadata.py:361-367, src/cluster_erp/modules/privacy/requests/routes.py:204-215

Labels come from the metadata label dictionaries.

Business rules

  • due_at is received_at plus privacy_response_days (src/cluster_erp/modules/privacy/requests/services.py:69-72, src/cluster_erp/config/settings.py:733).
  • Only an erasure request can be anonymised, and the operator must type the request code to confirm (src/cluster_erp/modules/privacy/requests/services.py:305-315).
  • A completed or rejected request cannot be updated (src/cluster_erp/modules/privacy/requests/services.py:174-186).

Events and queries

Direction Contract class Handler or emitter Source
emits CollectSubjectData SubjectRequestService.collect src/cluster_erp/modules/privacy/requests/services.py:221-231
emits AnonymiseSubject SubjectRequestService._apply_erasure src/cluster_erp/modules/privacy/requests/services.py:345-357
asks query GetPartyContactValues SubjectRequestService._subject_emails src/cluster_erp/modules/privacy/requests/services.py:209-219

The module subscribes to nothing (src/cluster_erp/modules/privacy/module.py:46-47).

Permissions

Permission key Used by Source
subject_request.read, subject_request.create, subject_request.update, subject_request.delete list, read, create, update, deactivate src/cluster_erp/modules/privacy/requests/routes.py:39-122
subject_request.verify, subject_request.export, subject_request.anonymise, subject_request.complete, subject_request.reject the actions src/cluster_erp/modules/privacy/requests/routes.py:125-215, seeded at src/cluster_erp/server/app.py:716-720

Privacy, retention, and history

The module holds personal data about the request itself. Erasures are written to the erasure ledger and replayed after a restore; see privacy and data-subject requests. The anonymisation replaces change-history values of the affected records (src/cluster_erp/modules/privacy/requests/services.py:396-406).

Analytics facts

This module has no analytics_facts.py.

Settings and reference data

privacy_response_days sets the deadline and privacy_anonymised_marker the text written over identifying fields (src/cluster_erp/config/settings.py:733-737). See the settings reference.

Tests

Found by file name in tests/ and web-client/.

Kind File Covers
pytest tests/test_privacy_requests.py the parts that hold without a database (8 tests)
pytest tests/test_erasure_ledger.py ledger sealing and reading (4 tests)
e2e web-client/_e2e_privacy_requests.mjs the request flow in the web app

Discrepancies

Terms introduced

Term Code identifier Definition Turkish term Source
request channel CHANNELS How a data-subject request reached the company. başvuru kanalı src/cluster_erp/modules/privacy/requests/models.py:23
due date due_at The date by which a data-subject request must be answered. son yanıt tarihi src/cluster_erp/modules/privacy/requests/models.py:62

Verified against commit 92f8051 on 2026-11-13.

Verified against commit 92f8051 · 2026-11-13