prey / gdpr_rails Goto Github PK
View Code? Open in Web Editor NEWRails Engine for the GDPR compliance
Home Page: https://preyproject.com
License: MIT License
Rails Engine for the GDPR compliance
Home Page: https://preyproject.com
License: MIT License
Hello
It is very important that there should be an option which will allow users to hide their application in the phone.
Hi, all info related to terms seems to be on a User object @user…
.
Is there a way to easily render out the terms posted and saved in policy_manager_terms?
The reason why I see this as useful and needed is that you can write your policies in the policy manager, and then show it on your privacy page. Say:
<%= policy_rule_age_content %>
from there it fetches the last and most updated one that is published and shows that.
I use ActiveStorage with my Rails app and when I launch my server I get this error :
undefined method `has_one_attached' for User (call 'User.connection' to establish a connection):Class (NoMethodError)
I think it's the same issue that this gem has
epfl-exts/rails-gdpr-export#1
Typo is breaking code
Does this gem have any accept dialog included? I can see https://preyproject.com/ is using cookiebot. What are people using? Any open source solution?
Hi,
Greate tool, but are you planning to roll out Rails 7 support? Currently gemspec restrict it to install in Rails 7 env... is it intentional?
Came across an error where the gem attempts to require paperclip in a rails 6 environment despite it being set to false.
Question - should require paperclip
in gdpr_rails-f8f4e72e3042/app/models/policy_manager/concerns/paperclip_behavior.rb
be handled differently for rails 6? Should zeitworks be added as a dep to the package per this post? https://medium.com/cedarcode/understanding-zeitwerk-in-rails-6-f168a9f09a1f
#config/initializers/gdpr_policy_manager.rb
PolicyManager::Config.setup do |config|
# config.paperclip = false
# ...
# ...gems/ruby-2.6.4/bundler/gems/gdpr_rails-f8f4e72e3042/app/models/policy_manager/portability_request.rb
require "aasm"
module PolicyManager
class PortabilityRequest < ApplicationRecord
belongs_to :user, class_name: Config.user_resource.to_s, foreign_key: :user_id
if PolicyManager::Config.paperclip
include PolicyManager::Concerns::PaperclipBehavior
else
include PolicyManager::Concerns::ActiveStorageBehavior
end
# ...
# ... gems/ruby-2.6.4/bundler/gems/gdpr_rails-f8f4e72e3042/app/models/policy_manager/concerns/paperclip_behavior.rb
# -*- encoding : utf-8 -*-
require "paperclip"
module PolicyManager::Concerns::PaperclipBehavior
extend ActiveSupport::Concern
include Paperclip::Glue
included do
# ...
from /usr/local/bundle/ruby/2.6.0/bundler/gems/gdpr_rails-f8f4e72e3042/app/models/policy_manager/concerns/paperclip_behavior.rb:2:in `<main>'
, [2020-01-28T21:16:14.127792 #1] INFO -- sentry: ** [Raven] Raven 2.13.0 ready to catch errors
=> Booting Puma
=> Rails 6.0.2.1 application starting in production
=> Run `rails server --help` for more startup options
I, [2020-01-28T21:16:15.650386 #1] INFO -- : Raven 2.13.0 ready to catch errors
Exiting
/usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require': cannot load such file -- paperclip (LoadError)
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
from /usr/local/bundle/ruby/2.6.0/bundler/gems/gdpr_rails-f8f4e72e3042/app/models/policy_manager/concerns/paperclip_behavior.rb:2:in `<main>'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:16:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `const_get'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:351:in `block (2 levels) in eager_load'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:685:in `block in ls'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `foreach'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:682:in `ls'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:346:in `block in eager_load'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `synchronize'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:338:in `eager_load'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `each'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/loader.rb:449:in `eager_load_all'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application/finisher.rb:122:in `block in <module:Finisher>'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `instance_exec'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:32:in `run'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
from /usr/local/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
from /usr/local/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /usr/local/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
from /usr/local/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each'
from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `call'
from /usr/local/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
from /usr/local/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
from /usr/local/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/initializable.rb:60:in `run_initializers'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/application.rb:363:in `initialize!'
from /app/config/environment.rb:5:in `<main>'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/zeitwerk-2.2.2/lib/zeitwerk/kernel.rb:23:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:48:in `require_relative'
from config.ru:3:in `block in <main>'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:71:in `instance_eval'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:71:in `initialize'
from config.ru:in `new'
from config.ru:in `<main>'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:65:in `eval'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:65:in `new_from_string'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:59:in `load_file'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/builder.rb:40:in `parse_file'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:351:in `build_app_and_options_from_config'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:251:in `app'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:424:in `wrapped_app'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:314:in `block in start'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:381:in `handle_profiling'
from /usr/local/bundle/ruby/2.6.0/gems/rack-2.1.1/lib/rack/server.rb:313:in `start'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:39:in `start'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:147:in `block in perform'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `tap'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands/server/server_command.rb:138:in `perform'
from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/command.rb:27:in `run'
from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/local/bundle/ruby/2.6.0/gems/thor-1.0.1/lib/thor.rb:392:in `dispatch'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command/base.rb:69:in `perform'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/command.rb:46:in `invoke'
from /usr/local/bundle/ruby/2.6.0/gems/railties-6.0.2.1/lib/rails/commands.rb:18:in `<main>'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:22:in `block in require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/loaded_features_index.rb:92:in `register'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:21:in `require_with_bootsnap_lfi'
from /usr/local/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:30:in `require'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `block in require'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:291:in `load_dependency'
from /usr/local/bundle/ruby/2.6.0/gems/activesupport-6.0.2.1/lib/active_support/dependencies.rb:325:in `require'
from bin/rails:4:in `<main>'
When looking at the branches, it seems that some effort were made to bring it to rails 6.
While trying to installing along rails 6.1.4 I get the following error:
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 6.1.4)
In Gemfile:
rails (~> 6.1.4) x86_64-linux
gdpr_rails x86_64-linux was resolved to 0.2.1, which depends on
rails (~> 5.1.4)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
However it seems that the last gem available in the directory is 0.5.1.
Trying to load 0.5.2 from this repo won't help much:
Bundler could not find compatible versions for gem "rubyzip":
In snapshot (Gemfile.lock):
rubyzip (= 2.3.2)
In Gemfile:
gdpr_rails (~> 0.5.2) x86_64-linux was resolved to 0.5.2, which depends on
rubyzip (>= 1.0.0, < 2)
selenium-webdriver x86_64-linux was resolved to 3.142.7, which depends on
rubyzip (>= 1.2.2) x86_64-linux
webdrivers x86_64-linux was resolved to 4.6.0, which depends on
rubyzip (>= 1.3.0) x86_64-linux
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
Do you have any plan to bring it to rails 6.1?
Thanks for your shared work.
Hi,
Awesome engine! thanks for the work.
A question: Following what is recommended by French authorities, we'd like to allow users to pick which service (GA, optimizely, whateva...) they want to accept.
You have an example here of how it would work (https://www.cnil.fr/=> click on the top page banner on "personnaliser" to open the modal).
Is it possible already on gdpr_rails to have
@user.has_consented_cookie? applied to specific cookies ? Let me give you an example, which is basically how the above website cnil.fr handles it:
A (not logged-in) user sees two lines
Is that how it works today ? is it possible to set up this behavior using gdpr_rails or is it really only "accept all cookies or reject all cookies" for the moment?
Could not figure it out based on the documentation. Thanks
M.
Hi there,
I have followed the instructions as per README and got gdpr_rails
working with active_admin
. However when I tried to look at the User model inside activeAdmin I get the following error:
Bootsnap::LoadPathCache::FallbackScan at /admin/users
and trace back to an issue with paperclip
. Weird thing is, I am using activestorage so I skipped the paperclip instructions.
gdpr_rails (0.5.0) app/models/policy_manager/concerns/active_storage_behavior.rb
# -*- encoding : utf-8 -*-
require "paperclip"
module PolicyManager::Concerns::ActiveStorageBehavior
extend ActiveSupport::Concern
included do
I dont think paperclip
is required in active_storage_behavior.rb` otherwise I have no idea on how to fix it.
Thanks in advance!!!
here is my initializer gdrp.rb
PolicyManager::Config.setup do |c|
c.admin_user_resource = AdminUser # Active Admin default
c.logout_url = "/admin/logout"
c.from_email = "[email protected]" # Active Admin default
c.admin_email_inbox = "[email protected]"
c.paperclip = false
# Cookie consent
c.add_rule({name: "cookie", sessionless: true } )
# Age confirmation
c.add_rule({name: "age", validates_on: [:create, :update], blocking: true })
# Privacy & TOC
c.add_rule({name: "privacy_terms", validates_on: [:create, :update], blocking: true })
PolicyManager::UserTermsController.send(:include, Devise::Controllers::Helpers)
end
and gemfile.lock
GEM
remote: https://rubygems.org/
specs:
aasm (5.0.6)
concurrent-ruby (~> 1.0)
actioncable (5.2.3)
actionpack (= 5.2.3)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailer (5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.2.3)
actionview (= 5.2.3)
activesupport (= 5.2.3)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.3)
activesupport (= 5.2.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activeadmin (2.3.1)
arbre (~> 1.2, >= 1.2.1)
formtastic (~> 3.1)
formtastic_i18n (~> 0.4)
inherited_resources (~> 1.7)
jquery-rails (~> 4.2)
kaminari (~> 1.0, >= 1.0.1)
railties (>= 5.0, < 6.1)
ransack (~> 2.1, >= 2.1.1)
sassc-rails (~> 2.1)
sprockets (>= 3.0, < 4.1)
sprockets-es6 (~> 0.9, >= 0.9.2)
activejob (5.2.3)
activesupport (= 5.2.3)
globalid (>= 0.3.6)
activemodel (5.2.3)
activesupport (= 5.2.3)
activerecord (5.2.3)
activemodel (= 5.2.3)
activesupport (= 5.2.3)
arel (>= 9.0)
activestorage (5.2.3)
actionpack (= 5.2.3)
activerecord (= 5.2.3)
marcel (~> 0.3.1)
activesupport (5.2.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
arbre (1.2.1)
activesupport (>= 3.0.0)
archive-zip (0.12.0)
io-like (~> 0.3.0)
arel (9.0.0)
babel-source (5.8.35)
babel-transpiler (0.7.0)
babel-source (>= 4.0, < 6)
execjs (~> 2.0)
bcrypt (3.1.13)
better_errors (2.5.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
bindex (0.8.1)
binding_of_caller (0.8.0)
debug_inspector (>= 0.0.1)
bootsnap (1.4.5)
msgpack (~> 1.0)
builder (3.2.3)
byebug (11.0.1)
capybara (3.29.0)
addressable
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (~> 1.5)
xpath (~> 3.2)
chartkick (3.2.1)
childprocess (2.0.0)
rake (< 13.0)
chromedriver-helper (2.1.1)
archive-zip (~> 0.10)
nokogiri (~> 1.8)
coderay (1.1.2)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.1.5)
crass (1.0.4)
debug_inspector (0.0.3)
devise (4.7.1)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
erubi (1.8.0)
execjs (2.7.0)
ffi (1.11.1)
formtastic (3.1.5)
actionpack (>= 3.2.13)
formtastic_i18n (0.6.0)
gdpr_rails (0.5.0)
aasm
chartkick (>= 3.2.0)
groupdate (= 4.0.0)
rails (>= 5.1.4, <= 6)
redcarpet
rubyzip (>= 1.0.0)
will_paginate
globalid (0.4.2)
activesupport (>= 4.2.0)
groupdate (4.0.0)
activesupport (>= 4.2)
has_scope (0.7.2)
actionpack (>= 4.1)
activesupport (>= 4.1)
i18n (1.6.0)
concurrent-ruby (~> 1.0)
inherited_resources (1.11.0)
actionpack (>= 5.0, < 6.1)
has_scope (~> 0.6)
railties (>= 5.0, < 6.1)
responders (>= 2, < 4)
io-like (0.3.0)
jbuilder (2.9.1)
activesupport (>= 4.2.0)
jquery-rails (4.3.5)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
kaminari (1.1.1)
activesupport (>= 4.1.0)
kaminari-actionview (= 1.1.1)
kaminari-activerecord (= 1.1.1)
kaminari-core (= 1.1.1)
kaminari-actionview (1.1.1)
actionview
kaminari-core (= 1.1.1)
kaminari-activerecord (1.1.1)
activerecord
kaminari-core (= 1.1.1)
kaminari-core (1.1.1)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
msgpack (1.3.1)
nio4r (2.5.1)
nokogiri (1.10.4)
mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0)
polyamorous (2.3.0)
activerecord (>= 5.0)
public_suffix (4.0.1)
puma (3.12.1)
rack (2.0.7)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (5.2.3)
actioncable (= 5.2.3)
actionmailer (= 5.2.3)
actionpack (= 5.2.3)
actionview (= 5.2.3)
activejob (= 5.2.3)
activemodel (= 5.2.3)
activerecord (= 5.2.3)
activestorage (= 5.2.3)
activesupport (= 5.2.3)
bundler (>= 1.3.0)
railties (= 5.2.3)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.2.0)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.3)
actionpack (= 5.2.3)
activesupport (= 5.2.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.3)
ransack (2.3.0)
actionpack (>= 5.0)
activerecord (>= 5.0)
activesupport (>= 5.0)
i18n
polyamorous (= 2.3.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
redcarpet (3.5.0)
regexp_parser (1.6.0)
responders (3.0.0)
actionpack (>= 5.0)
railties (>= 5.0)
ruby_dep (1.5.0)
rubyzip (1.2.4)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sass-rails (5.1.0)
railties (>= 5.2.0)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sassc (2.2.0)
ffi (~> 1.9)
sassc-rails (2.1.2)
railties (>= 4.0.0)
sassc (>= 2.0)
sprockets (> 3.0)
sprockets-rails
tilt
selenium-webdriver (3.142.4)
childprocess (>= 0.5, < 3.0)
rubyzip (~> 1.2, >= 1.2.2)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.2)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-es6 (0.9.2)
babel-source (>= 5.8.11)
babel-transpiler
sprockets (>= 3.0.0)
sprockets-rails (3.2.1)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sqlite3 (1.4.1)
thor (0.20.3)
thread_safe (0.3.6)
tilt (2.0.9)
turbolinks (5.2.0)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
uglifier (4.1.20)
execjs (>= 0.3.0, < 3)
warden (1.2.8)
rack (>= 2.0.6)
web-console (3.7.0)
actionview (>= 5.0)
activemodel (>= 5.0)
bindex (>= 0.4.0)
railties (>= 5.0)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
will_paginate (3.1.8)
xpath (3.2.0)
nokogiri (~> 1.8)
PLATFORMS
ruby
DEPENDENCIES
activeadmin
better_errors
binding_of_caller
bootsnap (>= 1.1.0)
byebug
capybara (>= 2.15)
chromedriver-helper
coffee-rails (~> 4.2)
devise
gdpr_rails
jbuilder (~> 2.5)
listen (>= 3.0.5, < 3.2)
puma (~> 3.11)
rails (~> 5.2.3)
sass-rails (~> 5.0)
selenium-webdriver
spring
spring-watcher-listen (~> 2.0.0)
sqlite3
turbolinks (~> 5)
uglifier (>= 1.3.0)
web-console (>= 3.3.0)
RUBY VERSION
ruby 2.6.3p62
BUNDLED WITH
1.17.2
I was unable to load the module PolicyManager::Concerns::UserTerms due to zeitwerk loading
I got around this by moving this module out of Concerns directory.
Explanation for why this doesn't work with rails 6.0.3.2 here: rails/rails#36054
Upgrading to 0.5+ keeps the app from running with the following error:
5: from /home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/gdpr_rails-0.5.1/app/models/policy_manager/concerns/paperclip_behavior.rb:2:in `<main>'
4: from /home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `require'
3: from /home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:291:in `load_dependency'
2: from /home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/activesupport-6.0.0/lib/active_support/dependencies.rb:325:in `block in require'
1: from /home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/skylight-core-4.1.2/lib/skylight/core/probes.rb:118:in `require'
/home/ubuntu/app/shared/bundle/ruby/2.6.0/gems/bootsnap-1.4.5/lib/bootsnap/load_path_cache/core_ext/kernel_require.rb:33:in `require': No such file to load -- paperclip.rb (LoadError)
Any ideas on how to debug this?
I tried setting paperclip
to false in the config, but that didn't seem to help. I use ActiveStorage.
I swear I had this working. It could very well be something on my end. It seems that even though I am passing in the following to the Devise registration controller:
"policy_rule_privacy"=>"0", "policy_rule_terms_of_service"=>"0"
The registration goes through with these policy configurations:
c.add_rule(
name: 'privacy',
validates_on: [:create, :update],
blocking: true,
if: ->(o){ !o.prevalidation && !ENV['SKIP_POLICY'] }
)
c.add_rule(
name: 'terms_of_service',
validates_on: [:create, :update],
blocking: true,
if: ->(o){ !o.prevalidation && !ENV['SKIP_POLICY'] }
)
It works as intended if I check the checkboxes, but if I leave them unchecked the validation still passes.
<label>
<%= f.check_box :policy_rule_privacy %>
You have read and agree to the terms outlined in our <a href="#">Privacy Policy</a>
</label>
<label>
<%= f.check_box :policy_rule_terms_of_service %>
You have read and agree to the terms outlined in our <a href="#">Terms of Service</a>
</label>
Any ideas what may be causing this?
Fetching gem metadata from https://rubygems.org/.........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.....
Bundler could not find compatible versions for gem "rails":
In Gemfile:
rails (= 6.0.1)
gdpr_rails was resolved to 0.5.1, which depends on
rails (>= 5.1.4, <= 6)
Hey there, was curious to know if you were able to get this working with Rails 5.2. I'm getting the following error:
Bundler could not find compatible versions for gem "rails":
In snapshot (Gemfile.lock):
rails (= 5.2.0)
In Gemfile:
rails (= 5.2.0)
gdpr_rails was resolved to 0.2.1, which depends on
rails (~> 5.1.4)
Running `bundle update` will rebuild your snapshot from scratch, using only
the gems in your Gemfile, which may resolve the conflict.
This issue is more like an idea as Paperclip deprecation has recently been announced.
A migration to ActiveStorage might be an interesting idea but I don't know if this could be an issue for rails <= 5.1 :/
An interesting article about this migration : https://gorails.com/episodes/migrate-from-paperclip-to-rails-active-storage
Any thoughts as to how current_user should be made available when Devise (and hence its helper that generates current_user) isn't being used?
I'm happy to work on this, but wanted to ask if anyone has an idea for how this should be done.
The method explaine in the readme does not seem to work (or even exist):
@user.store_policy_cookie if cookies["policy_rule_cookie"] == "accepted"
I had to do something like this to make it work:
class ApplicationController < ActionController::Base
protected
def after_sign_in_path_for(user)
handle_cookie_policy_for(user) if cookies["cookieconsent_status"] == "dismiss"
super(user)
end
def handle_cookie_policy_for(user)
rule_name = "cookie"
return if !user.needs_policy_confirmation_for?(rule_name)
term = user.policy_term_on(rule_name)
user.handle_policy_for(term).accept!
end
end
Should the Readme be updated or is it me not using correctly this method ?
Thanks for your help
The error arises when User model is configured with Mailboxer gem and it say's acts_as_messageable is undefined.
I tried to add acts_as_messageable method inside module PolicyManager::Concerns::UserBehavior
but still error shows up.
In model user.rb:
class User < ApplicationRecord
# Include default devise modules.
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable,
:confirmable #, :omniauthable #,:token_authenticatable
include DeviseTokenAuth::Concerns::User
include PolicyManager::Concerns::UserBehavior #policy management
acts_as_messageable
end
In gem PolicyManager::Concerns::UserBehavior
module PolicyManager::Concerns::UserBehavior
extend ActiveSupport::Concern
module ActiveRecordExtension
def acts_as_messageable
#code
end
end
Version: 0.3.4
My user class is sth like BlahUser
.
Configuration:
PolicyManager::Config.setup do |c|
c.user_resource = BlahUser # defaults to User
c.admin_user_resource = BlahUser # defaults to User
[...]
end
When i visit /policies/user_portability_requests
, i have an error saying that PortabilityRequests
does not have a field blah_user_id
. I had to change the migration CreatePolicyManagerPortabilityRequests
by hand (rename user_id
to blah_user_id
).
Is it the expected behavior or am I missing sth? (or the Readme?)
If you try and use GDPR_Rails with ActiveAdmin... the minute you select any model it will throw up an "Undefined method 'per'" error.
In addition to this... the "has_one_attached" error for the User models containing an "avatar" using Active Storage is still very much present.
Uninstalling GDPR_Rails and removing all references resolved the "Undefined method per" error. It is suspected that GDPR_Rails uses either Kaminari or WillPaginate.
The chartkick dependency in this repo is fixed to 2.3.4
. Due to a security vulnerability in chartkick, it should be updated to support >= 3.2.0
.
If you visit the root path when logged in as a regular user, the :allow_admins callback redirects to root_path, which creates a circular redirect.
Non-admins should be able to load the app.
Fix is just to add except: :index
to the callback
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.