Skip to content

Commit

Permalink
Add clear old private data controller (#316)
Browse files Browse the repository at this point in the history
* add maintenance controller

* standarize views

* fix gemfile

* fix gemfile

* fix gemfile

* add presenters

* add action log

* add specs

* add specs

* add private data info

* add specs

* add last specs

* fix spec
  • Loading branch information
microstudi authored Jul 31, 2024
1 parent 4045f80 commit 172661f
Show file tree
Hide file tree
Showing 52 changed files with 1,575 additions and 364 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Features:
- Added GraphQL types for custom fields in the API
- Adds parsed information about custom fields in the Proposals export
- Adds parsed information bout private custom fields when admins exports private data
- Adds a maintenance menu with tools to remove old private data

v0.11
------
Expand Down
214 changes: 96 additions & 118 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
decidim-decidim_awesome (0.11.0)
decidim-decidim_awesome (0.11.1)
decidim-admin (>= 0.28.0, < 0.29)
decidim-core (>= 0.28.0, < 0.29)
deface (>= 1.5)
Expand Down Expand Up @@ -95,7 +95,7 @@ GEM
brakeman (5.4.1)
browser (2.7.1)
builder (3.3.0)
bullet (7.1.6)
bullet (7.2.0)
activesupport (>= 3.0.0)
uniform_notifier (~> 1.11)
byebug (11.1.3)
Expand Down Expand Up @@ -141,55 +141,55 @@ GEM
date_validator (0.12.0)
activemodel (>= 3)
activesupport (>= 3)
decidim (0.28.1)
decidim-accountability (= 0.28.1)
decidim-admin (= 0.28.1)
decidim-api (= 0.28.1)
decidim-assemblies (= 0.28.1)
decidim-blogs (= 0.28.1)
decidim-budgets (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-debates (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-generators (= 0.28.1)
decidim-meetings (= 0.28.1)
decidim-pages (= 0.28.1)
decidim-participatory_processes (= 0.28.1)
decidim-proposals (= 0.28.1)
decidim-sortitions (= 0.28.1)
decidim-surveys (= 0.28.1)
decidim-system (= 0.28.1)
decidim-templates (= 0.28.1)
decidim-verifications (= 0.28.1)
decidim-accountability (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-admin (0.28.1)
decidim (0.28.2)
decidim-accountability (= 0.28.2)
decidim-admin (= 0.28.2)
decidim-api (= 0.28.2)
decidim-assemblies (= 0.28.2)
decidim-blogs (= 0.28.2)
decidim-budgets (= 0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-debates (= 0.28.2)
decidim-forms (= 0.28.2)
decidim-generators (= 0.28.2)
decidim-meetings (= 0.28.2)
decidim-pages (= 0.28.2)
decidim-participatory_processes (= 0.28.2)
decidim-proposals (= 0.28.2)
decidim-sortitions (= 0.28.2)
decidim-surveys (= 0.28.2)
decidim-system (= 0.28.2)
decidim-templates (= 0.28.2)
decidim-verifications (= 0.28.2)
decidim-accountability (0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-admin (0.28.2)
active_link_to (~> 1.0)
decidim-core (= 0.28.1)
decidim-core (= 0.28.2)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-api (0.28.1)
decidim-api (0.28.2)
commonmarker (~> 0.23.0, >= 0.23.9)
decidim-core (= 0.28.1)
decidim-core (= 0.28.2)
graphql (~> 2.0.0)
graphql-docs (~> 3.0.1)
rack-cors (~> 1.0)
decidim-assemblies (0.28.1)
decidim-core (= 0.28.1)
decidim-blogs (0.28.1)
decidim-admin (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-budgets (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-comments (0.28.1)
decidim-core (= 0.28.1)
decidim-assemblies (0.28.2)
decidim-core (= 0.28.2)
decidim-blogs (0.28.2)
decidim-admin (= 0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-budgets (0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-comments (0.28.2)
decidim-core (= 0.28.2)
redcarpet (~> 3.5, >= 3.5.1)
decidim-core (0.28.1)
decidim-core (0.28.2)
active_link_to (~> 1.0)
acts_as_list (~> 1.0)
batch-loader (~> 1.2)
Expand Down Expand Up @@ -239,14 +239,14 @@ GEM
valid_email2 (~> 4.0)
web-push (~> 3.0)
wisper (~> 2.0)
decidim-debates (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-dev (0.28.1)
decidim-debates (0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-dev (0.28.2)
bullet (~> 7.0)
byebug (~> 11.0)
capybara (~> 3.39)
decidim (= 0.28.1)
decidim (= 0.28.2)
erb_lint (~> 0.4.0)
factory_bot_rails (~> 6.2)
faker (~> 3.2)
Expand All @@ -271,44 +271,44 @@ GEM
w3c_rspec_validators (~> 0.3.0)
webmock (~> 3.18)
wisper-rspec (~> 1.0)
decidim-forms (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (0.28.2)
decidim-core (= 0.28.2)
wicked_pdf (~> 2.1)
wkhtmltopdf-binary (~> 0.12)
decidim-generators (0.28.1)
decidim-core (= 0.28.1)
decidim-meetings (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-generators (0.28.2)
decidim-core (= 0.28.2)
decidim-meetings (0.28.2)
decidim-core (= 0.28.2)
decidim-forms (= 0.28.2)
icalendar (~> 2.5)
decidim-pages (0.28.1)
decidim-core (= 0.28.1)
decidim-participatory_processes (0.28.1)
decidim-core (= 0.28.1)
decidim-proposals (0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-pages (0.28.2)
decidim-core (= 0.28.2)
decidim-participatory_processes (0.28.2)
decidim-core (= 0.28.2)
decidim-proposals (0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
doc2text (~> 0.4.6)
redcarpet (~> 3.5, >= 3.5.1)
decidim-sortitions (0.28.1)
decidim-admin (= 0.28.1)
decidim-comments (= 0.28.1)
decidim-core (= 0.28.1)
decidim-proposals (= 0.28.1)
decidim-surveys (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-system (0.28.1)
decidim-sortitions (0.28.2)
decidim-admin (= 0.28.2)
decidim-comments (= 0.28.2)
decidim-core (= 0.28.2)
decidim-proposals (= 0.28.2)
decidim-surveys (0.28.2)
decidim-core (= 0.28.2)
decidim-forms (= 0.28.2)
decidim-system (0.28.2)
active_link_to (~> 1.0)
decidim-core (= 0.28.1)
decidim-core (= 0.28.2)
devise (~> 4.7)
devise-i18n (~> 1.2)
devise_invitable (~> 2.0, >= 2.0.9)
decidim-templates (0.28.1)
decidim-core (= 0.28.1)
decidim-forms (= 0.28.1)
decidim-verifications (0.28.1)
decidim-core (= 0.28.1)
decidim-templates (0.28.2)
decidim-core (= 0.28.2)
decidim-forms (= 0.28.2)
decidim-verifications (0.28.2)
decidim-core (= 0.28.2)
declarative-builder (0.1.0)
declarative-option (< 0.2.0)
declarative-option (0.1.0)
Expand All @@ -335,7 +335,7 @@ GEM
doc2text (0.4.7)
nokogiri (>= 1.13.2, < 1.17.0)
rubyzip (~> 2.3.0)
docile (1.4.0)
docile (1.4.1)
doorkeeper (5.7.1)
railties (>= 5)
doorkeeper-i18n (4.0.1)
Expand All @@ -358,19 +358,14 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.4.1)
faker (3.4.2)
i18n (>= 1.8.11, < 2)
faraday (2.10.0)
faraday-net_http (>= 2.0, < 3.2)
logger
faraday-net_http (3.1.0)
net-http
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0)
file_validators (3.0.0)
activemodel (>= 3.2)
mime-types (>= 1.0)
Expand Down Expand Up @@ -405,7 +400,8 @@ GEM
sass (~> 3.4)
hashdiff (1.1.0)
hashie (5.0.0)
highline (3.0.1)
highline (3.1.0)
reline
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
Expand All @@ -422,14 +418,15 @@ GEM
rails-i18n
rainbow (>= 2.2.2, < 4.0)
terminal-table (>= 1.5.1)
icalendar (2.10.1)
icalendar (2.10.2)
ice_cube (~> 0.16)
ice_cube (0.16.4)
ice_cube (0.17.0)
image_processing (1.12.2)
mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.17, < 3)
invisible_captcha (0.13.0)
rails (>= 3.2.0)
io-console (0.7.2)
json (2.7.2)
jwt (2.8.2)
base64
Expand Down Expand Up @@ -491,16 +488,6 @@ GEM
net-smtp (0.3.4)
net-protocol
nio4r (2.7.3)
nokogiri (1.16.6-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm-linux)
racc (~> 1.4)
nokogiri (1.16.6-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86-linux)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
oauth (1.1.0)
Expand Down Expand Up @@ -547,7 +534,7 @@ GEM
parallel (1.25.1)
parallel_tests (4.7.1)
parallel
parser (3.3.3.0)
parser (3.3.4.0)
ast (~> 2.4.1)
racc
pg (1.4.6)
Expand Down Expand Up @@ -628,6 +615,8 @@ GEM
redcarpet (3.6.0)
redis (4.8.1)
regexp_parser (2.9.2)
reline (0.5.9)
io-console (~> 0.5)
request_store (1.5.1)
rack (>= 1.4)
responders (3.1.1)
Expand Down Expand Up @@ -678,25 +667,18 @@ GEM
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
parser (>= 3.3.1.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-factory_bot (2.26.0)
rubocop-capybara (2.18.0)
rubocop (~> 1.41)
rubocop-faker (1.1.0)
faker (>= 2.12.0)
rubocop (>= 0.82.0)
rubocop-rails (2.25.1)
rubocop-rails (2.19.1)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.31.0)
rubocop (~> 1.40)
rubocop-rspec (2.20.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.29.0)
rubocop (~> 1.40)
ruby-progressbar (1.13.0)
ruby-vips (2.2.1)
ffi (~> 1.12)
Expand All @@ -711,7 +693,7 @@ GEM
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
selenium-webdriver (4.22.0)
selenium-webdriver (4.23.0)
base64 (~> 0.2)
logger (~> 1.4)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -789,7 +771,7 @@ GEM
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
websocket (1.2.10)
websocket (1.2.11)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
Expand All @@ -803,20 +785,16 @@ GEM
zeitwerk (2.6.16)

PLATFORMS
aarch64-linux
arm-linux
arm64-darwin
x86-linux
x86_64-darwin
x86_64-linux

DEPENDENCIES
bootsnap (~> 1.4)
brakeman (~> 5.4)
byebug (~> 11.0)
decidim (= 0.28.1)
decidim (= 0.28.2)
decidim-decidim_awesome!
decidim-dev (= 0.28.1)
decidim-dev (= 0.28.2)
decidim-templates (= 0.28.2)
letter_opener_web (~> 2.0)
listen (~> 3.1)
net-imap (~> 0.2.3)
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,17 @@ This option is disable by default, must be enabled in the component's configurat

![Limiting amendments](examples/limit_amendments.png)

#### 18. Maintenance tools

The awesome admin provides with some maintenance tools (more to come in the future);

##### 18.1 Old private data removal

These tools are designed to help remove old data as required by laws such as GDPR, particularly in relation to private custom fields.
This menu will show if there's any data older than 6 months (configurable) and will let admins remove it component by component.

![Private data](examples/private_data.png)

#### To be continued...

We're not done! Please check the [issues](/decidim-ice/decidim-module-decidim_awesome/issues) (and participate) to see what's on our mind
Expand Down
Loading

0 comments on commit 172661f

Please sign in to comment.