gdpr_admin 1.2.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +28 -3
- data/lib/gdpr_admin/application_data_policy.rb +1 -0
- data/lib/gdpr_admin/helpers/scope_helper.rb +11 -0
- data/lib/gdpr_admin/version.rb +1 -1
- data/lib/gdpr_admin.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b5cc14d1e0f88e99bec3ccd100795cc1985ef86fa559fbdd2639bdd5bef1ee4
|
4
|
+
data.tar.gz: 5c07836dec53a6265e3fcd6516f910a22b6834234bea5f39890030ba394d0e5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4552232540bf1153c32e15ccc1ec0ed5f5a399649bd5618ded36476881124d2496a1f345deec8f5baf98ecba1ff4e0161743ca905abae45761024d9c68432e0
|
7
|
+
data.tar.gz: 8169ff0b5040484ceac0084601246d19d875e222509ec2f1a2dab055822d79db13b999c6a96468167cf39adfe5cc26b0aff60b9c046bbcc31422177e2ca66684
|
data/README.md
CHANGED
@@ -6,12 +6,17 @@
|
|
6
6
|
|
7
7
|
[](https://github.com/Colex/gdpr_admin/actions/workflows/build.yml)
|
8
8
|
[](https://codeclimate.com/github/Colex/gdpr_admin)
|
9
|
+
[](https://codeclimate.com/github/Colex/gdpr_admin/test_coverage)
|
9
10
|
[](http://badge.fury.io/rb/gdpr_admin)
|
10
11
|
|
11
12
|
Rails engine for processing GDPR processes. GDPR Admin offers a simple interface for defining strategies for automating the process of data access and data removal as required by data privacy regulations like GDPR.
|
12
13
|
|
13
14
|
GDPR Admin uses simple Ruby classes, so you're free to code your Data Policies as you see fit. A swiss knife of
|
14
|
-
helper methods are available to make the processes even simpler.
|
15
|
+
helper methods are available to make the processes even simpler. The focus of the gem is to easily implement:
|
16
|
+
|
17
|
+
- [Right of access](https://ico.org.uk/for-organisations/guide-to-data-protection/guide-to-the-general-data-protection-regulation-gdpr/individual-rights/right-of-access/): export a subject's data on request;
|
18
|
+
- [Right to erasure](https://ico.org.uk/for-organisations/guide-to-data-protection/guide-to-the-general-data-protection-regulation-gdpr/individual-rights/right-to-erasure/): remove a subject's personal data on request;
|
19
|
+
- [Storage limitation](https://ico.org.uk/for-organisations/guide-to-data-protection/guide-to-the-general-data-protection-regulation-gdpr/principles/storage-limitation/): hold data for as long as required (data retention policies and offboarding tenants);
|
15
20
|
|
16
21
|
## Installation
|
17
22
|
Add this line to your application's Gemfile:
|
@@ -67,6 +72,26 @@ GdprAdmin::Request.create!(
|
|
67
72
|
|
68
73
|
Creating a request will automatically enqueue the request to be processed in 4 hours - this gives time to cancel an accidental request. You can configure this grace period as desired.
|
69
74
|
|
75
|
+
### Scope Helpers
|
76
|
+
Helpers to be used within the `#scope` method.
|
77
|
+
|
78
|
+
#### `scope_by_date`
|
79
|
+
|
80
|
+
```ruby
|
81
|
+
scope_by_date(scope, field = :updated_at)
|
82
|
+
```
|
83
|
+
|
84
|
+
Automatically scopes the data using the `updated_at` column to match the GDPR Request. You can use a different column by providing
|
85
|
+
a second argument.
|
86
|
+
|
87
|
+
```ruby
|
88
|
+
class ContactDataPolicy < GdprAdmin::ApplicationDataPolicy
|
89
|
+
def scope
|
90
|
+
scope_by_date(Contact)
|
91
|
+
end
|
92
|
+
end
|
93
|
+
```
|
94
|
+
|
70
95
|
### Anonymization Helpers
|
71
96
|
A set of helper methods are available to make the anonymization even simpler. These are not mandatory, but can help you
|
72
97
|
keep your code cleaner and, better, write less code.
|
@@ -155,9 +180,9 @@ You can define a repeating job with `sidekiq-cron`:
|
|
155
180
|
|
156
181
|
```ruby
|
157
182
|
Sidekiq::Cron::Job.create(
|
158
|
-
class:
|
183
|
+
class: 'GdprAdmin::DataRetentionPoliciesRunnerJob',
|
159
184
|
cron: '0 2 * * *',
|
160
|
-
name: '
|
185
|
+
name: 'Run Data Retention Policies',
|
161
186
|
queue: 'cron',
|
162
187
|
active_job: true,
|
163
188
|
)
|
data/lib/gdpr_admin/version.rb
CHANGED
data/lib/gdpr_admin.rb
CHANGED
@@ -7,6 +7,7 @@ require 'gdpr_admin/error'
|
|
7
7
|
require 'gdpr_admin/invalid_status_error'
|
8
8
|
require 'gdpr_admin/skip_data_policy_error'
|
9
9
|
require 'gdpr_admin/helpers/erase_helper'
|
10
|
+
require 'gdpr_admin/helpers/scope_helper'
|
10
11
|
require 'gdpr_admin/application_data_policy'
|
11
12
|
require 'gdpr_admin/paper_trail/version_data_policy'
|
12
13
|
require 'gdpr_admin/tenant_adapters/acts_as_tenant_adapter'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gdpr_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Colex
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- lib/gdpr_admin/helpers/erase_helper.rb
|
169
169
|
- lib/gdpr_admin/helpers/field_anonymizer_helper.rb
|
170
170
|
- lib/gdpr_admin/helpers/paper_trail_helper.rb
|
171
|
+
- lib/gdpr_admin/helpers/scope_helper.rb
|
171
172
|
- lib/gdpr_admin/invalid_status_error.rb
|
172
173
|
- lib/gdpr_admin/paper_trail/version_data_policy.rb
|
173
174
|
- lib/gdpr_admin/skip_data_policy_error.rb
|