Skip to content

Commit 52fa4f8

Browse files
authored
Merge pull request #27 from OS2web/feature/enhance-documentation
5846: More documentation
2 parents f55456f + 99ed92b commit 52fa4f8

File tree

4 files changed

+91
-5
lines changed

4 files changed

+91
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
## [Unreleased]
1010

11+
- Added documentation on
12+
- Purging queue jobs
13+
- Modules implementing audit log
14+
1115
## [1.2.0] - 2025-07-03
1216

1317
- Added drupal 11 compatibility

README.md

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,12 @@ $msg = sprintf('Fetch personal data from service with parameter: %s', $param);
7272
$this->auditLogger->info('Lookup', $msg);
7373
```
7474

75-
### Queue
75+
### Implementations
76+
77+
See [implementations](/docs/IMPLEMENTATIONS.md) for a list of modules that have
78+
audit logging integrated.
79+
80+
## Queue
7681

7782
The actual logging is handled by jobs in an [Advanced
7883
Queue](https://www.drupal.org/project/advancedqueue) queue.
@@ -93,9 +98,22 @@ drush advancedqueue:queue:list
9398
or go to `/admin/config/system/queues/jobs/os2web_audit` for a
9499
graphical overview of jobs in the queue.
95100

96-
### Coding standards
101+
### Purge successful jobs
102+
103+
It is possible to configure the queue to purge jobs based on
104+
the number of jobs or the number of days since processing.
105+
106+
Go to `admin/config/system/queues/manage/os2web_audit` to configure this.
107+
108+
Below is an example of purging successful jobs after 7 days.
109+
110+
![queue purge config](/docs/queue_purge_config.png)
111+
112+
Remember to export this to ensure it is not overridden upon config import.
113+
114+
## Coding standards
97115

98-
#### PHP files (PHP_CodeSniffer)
116+
### PHP files (PHP_CodeSniffer)
99117

100118
Check PHP coding standards
101119

@@ -111,15 +129,15 @@ docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest comp
111129
docker run --interactive --rm --volume ${PWD}:/app itkdev/php8.3-fpm:latest composer coding-standards-apply
112130
```
113131

114-
### Code analysis
132+
## Code analysis
115133

116134
phpstan is used to perform static analysis of the code. Run the following script:
117135

118136
```sh
119137
./scripts/code-analysis
120138
```
121139

122-
#### Markdown files
140+
### Markdown files
123141

124142
```shell
125143
docker run --interactive --rm --volume "$PWD:/md" itkdev/markdownlint markdownlint '**/*.md' --fix

docs/IMPLEMENTATIONS.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Implementations
2+
3+
The following contrib modules inject an audit logger.
4+
5+
## OS2Forms submodules
6+
7+
Modules within [os2forms/os2forms](https://github.com/OS2Forms/os2forms) that audit logs:
8+
9+
### [os2forms_fbs_handler](https://github.com/OS2Forms/os2forms/tree/develop/modules/os2forms_fbs_handler)
10+
11+
Audit logs when:
12+
13+
* Patron is created
14+
15+
### [os2forms_digital_post](https://github.com/OS2Forms/os2forms/tree/develop/modules/os2forms_digital_post)
16+
17+
Audit logs when:
18+
19+
* Digital post is sent
20+
21+
### [os2forms_fasit](https://github.com/OS2Forms/os2forms/tree/develop/modules/os2forms_fasit)
22+
23+
Audit logs when:
24+
25+
* File is uploaded to Fasit
26+
* Document is uploaded to Fasit
27+
28+
### [os2forms_nemid](https://github.com/OS2Forms/os2forms/tree/develop/modules/os2forms_nemid)
29+
30+
Audit logs when:
31+
32+
* User is looking up CPR-number.
33+
34+
## Other modules
35+
36+
### [os2web/os2web_datalookup](https://github.com/OS2web/os2web_datalookup)
37+
38+
Audit logs when:
39+
40+
* Company is queried via CVR-number
41+
* Company is queried via P-number
42+
* Person is queried via CPR-number
43+
44+
### [itk-dev/os2forms_nemlogin_openid_connect](https://github.com/itk-dev/os2forms_nemlogin_openid_connect)
45+
46+
Audit logs when:
47+
48+
* Upon OIDC login
49+
* Upon OIDC logout
50+
51+
### [os2forms/os2forms_get_organized](https://github.com/OS2Forms/os2forms_get_organized)
52+
53+
Audit logs when:
54+
55+
* Case is created
56+
* Relation is established between documents
57+
* Documents are finalized (journaliseret)
58+
* Document is archived to case
59+
60+
### [os2forms/os2forms_organisation](https://github.com/itk-dev/os2forms_organisation)
61+
62+
Audit logs when:
63+
64+
* User is looking up organisation data.

docs/queue_purge_config.png

87.5 KB
Loading

0 commit comments

Comments
 (0)