bpluser 0.1.12 → 0.1.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/bpluser/user.rb~ +213 -0
- data/app/models/bpluser/validatable.rb~ +65 -0
- data/lib/bpluser/version.rb +1 -1
- metadata +34 -157
- data/.gitignore +0 -70
- data/Gemfile +0 -19
- data/README.rdoc +0 -3
- data/bin/rails +0 -13
- data/bin/rspec +0 -29
- data/bpluser.gemspec +0 -38
- data/spec/dummy/.ruby-version +0 -1
- data/spec/dummy/Rakefile +0 -6
- data/spec/dummy/app/assets/config/manifest.js +0 -4
- data/spec/dummy/app/assets/images/.keep +0 -0
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/javascripts/cable.js +0 -13
- data/spec/dummy/app/assets/javascripts/channels/.keep +0 -0
- data/spec/dummy/app/assets/stylesheets/application.css +0 -15
- data/spec/dummy/app/channels/application_cable/channel.rb +0 -4
- data/spec/dummy/app/channels/application_cable/connection.rb +0 -4
- data/spec/dummy/app/controllers/application_controller.rb +0 -2
- data/spec/dummy/app/controllers/concerns/.keep +0 -0
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/jobs/application_job.rb +0 -2
- data/spec/dummy/app/mailers/application_mailer.rb +0 -4
- data/spec/dummy/app/models/application_record.rb +0 -3
- data/spec/dummy/app/models/concerns/.keep +0 -0
- data/spec/dummy/app/models/user.rb +0 -3
- data/spec/dummy/app/views/layouts/application.html.erb +0 -15
- data/spec/dummy/app/views/layouts/mailer.html.erb +0 -13
- data/spec/dummy/app/views/layouts/mailer.text.erb +0 -1
- data/spec/dummy/bin/bundle +0 -3
- data/spec/dummy/bin/rails +0 -4
- data/spec/dummy/bin/rake +0 -4
- data/spec/dummy/bin/setup +0 -36
- data/spec/dummy/bin/update +0 -31
- data/spec/dummy/bin/yarn +0 -11
- data/spec/dummy/config/application.rb +0 -29
- data/spec/dummy/config/boot.rb +0 -5
- data/spec/dummy/config/cable.yml +0 -10
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -61
- data/spec/dummy/config/environments/production.rb +0 -94
- data/spec/dummy/config/environments/test.rb +0 -46
- data/spec/dummy/config/initializers/application_controller_renderer.rb +0 -8
- data/spec/dummy/config/initializers/assets.rb +0 -14
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/content_security_policy.rb +0 -25
- data/spec/dummy/config/initializers/cookies_serializer.rb +0 -5
- data/spec/dummy/config/initializers/devise.rb +0 -290
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +0 -4
- data/spec/dummy/config/initializers/inflections.rb +0 -16
- data/spec/dummy/config/initializers/mime_types.rb +0 -4
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/devise.en.yml +0 -64
- data/spec/dummy/config/locales/en.yml +0 -33
- data/spec/dummy/config/puma.rb +0 -34
- data/spec/dummy/config/routes.rb +0 -3
- data/spec/dummy/config/spring.rb +0 -6
- data/spec/dummy/config/storage.yml +0 -34
- data/spec/dummy/config.ru +0 -5
- data/spec/dummy/db/migrate/20181231191301_create_users.rb +0 -41
- data/spec/dummy/db/schema.rb +0 -39
- data/spec/dummy/lib/assets/.keep +0 -0
- data/spec/dummy/log/.keep +0 -0
- data/spec/dummy/package.json +0 -5
- data/spec/dummy/public/404.html +0 -67
- data/spec/dummy/public/422.html +0 -67
- data/spec/dummy/public/500.html +0 -66
- data/spec/dummy/public/apple-touch-icon-precomposed.png +0 -0
- data/spec/dummy/public/apple-touch-icon.png +0 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/spec/models/user_spec.rb +0 -5
- data/spec/dummy/storage/.keep +0 -0
- data/spec/dummy/tmp/.keep +0 -0
- data/spec/dummy/tmp/storage/.keep +0 -0
- data/spec/rails_helper.rb +0 -61
- data/spec/spec_helper.rb +0 -96
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b8c28ca57372055482b66bd2e3229a1a82bc34e
|
4
|
+
data.tar.gz: b0595b32279178cab209199c5a10a97189bdb0cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e80d6148fedc132d46a275545db44e5ad8857bb4c2de4594eb1132557787e6c642dd38591fded0ae82a7d37be6ec53b03056627105831fad3c7b8448ac72e80
|
7
|
+
data.tar.gz: 0ebf166306bde370d7e6838bba283ab14efa5f93c2ecfb3a1ad1b8c2f396640697359991c92b393d3f89514247235f2574fa2a7415d79b26c25df9fdc4fa2932
|
@@ -0,0 +1,213 @@
|
|
1
|
+
module Bpluser::User
|
2
|
+
|
3
|
+
#DEPRECATED TO BE REMOVED UPON RELASE OF NEXT VERSION IN FAVOR OF CONCERNS
|
4
|
+
def self.included(base)
|
5
|
+
#, :validatable
|
6
|
+
base.send :devise, :database_authenticatable, :registerable,
|
7
|
+
:recoverable, :rememberable, :trackable, :omniauthable, :omniauth_providers => [:ldap, :polaris, :facebook]
|
8
|
+
#base.send :attr_accessible, :provider, :username, :email, :password, :password_confirmation, :remember_me, :first_name, :last_name, :display_name, :uid
|
9
|
+
base.send :has_many, :user_institutions, inverse_of: :user, dependent: :destroy, :class_name => "Bpluser::UserInstitution"
|
10
|
+
base.send :has_many, :folders, :dependent => :destroy, :class_name => "Bpluser::Folder"
|
11
|
+
base.extend(ClassMethods)
|
12
|
+
base.send :include, InstanceMethods
|
13
|
+
|
14
|
+
#Include custom validation that doesn't require email to be uniqe. Based on: https://github.com/plataformatec/devise/blob/master/lib/devise/models/validatable.rb
|
15
|
+
base.send :include, Bpluser::Validatable
|
16
|
+
|
17
|
+
end
|
18
|
+
|
19
|
+
module ClassMethods
|
20
|
+
def find_for_ldap_oauth(auth_response, signed_in_resource=nil)
|
21
|
+
|
22
|
+
|
23
|
+
ldap_raw_details = auth_response[:extra][:raw_info]
|
24
|
+
ldap_info_details = auth_response[:info]
|
25
|
+
|
26
|
+
user = User.where(:provider => auth_response.provider, :uid => ldap_raw_details.samaccountname[0].downcase).first
|
27
|
+
|
28
|
+
#first_name:ldap_info_details.first_name,
|
29
|
+
#last_name:ldap_info_details.last_name,
|
30
|
+
unless user
|
31
|
+
user = User.create(provider:auth_response.provider,
|
32
|
+
uid:ldap_raw_details.samaccountname[0].downcase,
|
33
|
+
username:ldap_raw_details.samaccountname[0].downcase,
|
34
|
+
email:ldap_raw_details.mail[0].to_s.downcase,
|
35
|
+
password:Devise.friendly_token[0,20],
|
36
|
+
display_name: ldap_info_details.first_name + " " + ldap_info_details.last_name,
|
37
|
+
first_name: ldap_info_details.first_name,
|
38
|
+
last_name: ldap_info_details.last_name
|
39
|
+
)
|
40
|
+
end
|
41
|
+
groups = user.ldap_groups
|
42
|
+
groups.each do |group|
|
43
|
+
if(group == "Repository Administrators")
|
44
|
+
superuser_role = Role.where(:name=>'superuser').first
|
45
|
+
if(superuser_role == nil)
|
46
|
+
superuser_role = Role.create(:name=>"superuser")
|
47
|
+
end
|
48
|
+
user.roles << superuser_role unless user.roles.include?(superuser_role)
|
49
|
+
user.save!
|
50
|
+
|
51
|
+
admin_role = Role.where(:name=>'admin').first
|
52
|
+
if(admin_role == nil)
|
53
|
+
admin_role = Role.create(:name=>"admin")
|
54
|
+
end
|
55
|
+
user.roles << admin_role unless user.roles.include?(admin_role)
|
56
|
+
user.save!
|
57
|
+
end
|
58
|
+
|
59
|
+
end
|
60
|
+
|
61
|
+
user
|
62
|
+
end
|
63
|
+
|
64
|
+
def find_for_polaris_oauth(auth_response, signed_in_resource=nil)
|
65
|
+
polaris_raw_details = auth_response[:extra][:raw_info]
|
66
|
+
polaris_info_details = auth_response[:info]
|
67
|
+
|
68
|
+
user = User.where(:provider => auth_response.provider, :uid => auth_response[:uid]).first
|
69
|
+
|
70
|
+
#first_name:ldap_info_details.first_name,
|
71
|
+
#last_name:ldap_info_details.last_name,
|
72
|
+
unless user
|
73
|
+
email_value = polaris_info_details[:email].present? ? polaris_info_details[:email] : ''
|
74
|
+
#For some reason, User.create has no id set despite that intending to be autocreated. Unsure what is up with that. So trying this.
|
75
|
+
user = User.new(provider:auth_response.provider,
|
76
|
+
uid:auth_response[:uid],
|
77
|
+
username:polaris_info_details[:first_name],
|
78
|
+
email:email_value,
|
79
|
+
password:Devise.friendly_token[0,20],
|
80
|
+
display_name:polaris_info_details[:first_name] + " " + polaris_info_details[:last_name],
|
81
|
+
first_name: polaris_info_details[:first_name],
|
82
|
+
last_name: polaris_info_details[:last_name]
|
83
|
+
|
84
|
+
)
|
85
|
+
user.save!
|
86
|
+
|
87
|
+
end
|
88
|
+
user
|
89
|
+
end
|
90
|
+
|
91
|
+
def find_for_facebook_oauth(auth, signed_in_resource=nil)
|
92
|
+
user = User.where(:provider => auth.provider, :uid => auth.uid).first
|
93
|
+
unless user
|
94
|
+
user = User.create(display_name:auth.extra.raw_info.name,
|
95
|
+
uid:auth.uid,
|
96
|
+
provider:auth.provider,
|
97
|
+
username:auth.info.nickname,
|
98
|
+
email:auth.info.email,
|
99
|
+
password:Devise.friendly_token[0,20] ,
|
100
|
+
first_name:auth.extra.raw_info.first_name,
|
101
|
+
last_name:auth.extra.raw_info.last_name
|
102
|
+
)
|
103
|
+
end
|
104
|
+
user
|
105
|
+
end
|
106
|
+
|
107
|
+
def find_for_local_auth(auth, signed_in_resource=nil)
|
108
|
+
user = User.where(:provider => auth.provider, :uid => auth.uid).first
|
109
|
+
unless user
|
110
|
+
user = User.create(display_name:auth.full_name,
|
111
|
+
uid:auth.uid,
|
112
|
+
provider:auth.provider,
|
113
|
+
username:auth.uid,
|
114
|
+
email:auth.email,
|
115
|
+
password:auth.password,
|
116
|
+
first_name:auth.first_name,
|
117
|
+
last_name:auth.last_name
|
118
|
+
)
|
119
|
+
end
|
120
|
+
user
|
121
|
+
end
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
# This method should find User objects using the user_key you've chosen.
|
127
|
+
# By default, uses the unique identifier specified in by devise authentication_keys (ie. find_by_id, or find_by_email).
|
128
|
+
# You must have that find method implemented on your user class, or must override find_by_user_key
|
129
|
+
#def find_by_user_key(key)
|
130
|
+
#self.send("find_by_#{Devise.authentication_keys.first}".to_sym, key)
|
131
|
+
#end
|
132
|
+
end
|
133
|
+
|
134
|
+
#has_and_belongs_to_many :groups
|
135
|
+
|
136
|
+
# Method added by Blacklight; Blacklight uses #to_s on your
|
137
|
+
# user class to get a user-displayable login/identifier for
|
138
|
+
# the account.
|
139
|
+
|
140
|
+
# The following methods will be included in any active model object
|
141
|
+
# that calls "is_blacklight_user"
|
142
|
+
module InstanceMethods
|
143
|
+
|
144
|
+
|
145
|
+
def to_s
|
146
|
+
self.username
|
147
|
+
end
|
148
|
+
|
149
|
+
def name
|
150
|
+
return self.username rescue self.display_name.titleize
|
151
|
+
end
|
152
|
+
|
153
|
+
def user_key
|
154
|
+
send(Devise.authentication_keys.first)
|
155
|
+
end
|
156
|
+
|
157
|
+
|
158
|
+
def ldap_groups
|
159
|
+
#Hydra::LDAP.groups_for_user(username + ",dc=psu,dc=edu")
|
160
|
+
#['archivist', 'admin_policy_object_editor']
|
161
|
+
|
162
|
+
Hydra::LDAP.groups_for_user(Net::LDAP::Filter.eq('samaccountname', self.username), ['memberOf']) { |result| result.first[:memberOf].select{ |y| y.starts_with? 'CN=' }.map{ |x| x.sub(/^CN=/, '').sub(/,OU=Private Groups,DC=private,DC=bpl,DC=org/, '').sub(/,OU=Distribution Lists/, '').sub(/,OU=Security Groups/, '') } } rescue []
|
163
|
+
end
|
164
|
+
|
165
|
+
def populate_attributes
|
166
|
+
|
167
|
+
end
|
168
|
+
|
169
|
+
def default_user_groups
|
170
|
+
# # everyone is automatically a member of the group 'public'
|
171
|
+
#['public', 'test']
|
172
|
+
end
|
173
|
+
|
174
|
+
def get_uploads_collection
|
175
|
+
query="rightsMetadata_edit_access_machine_person_t:#{uid} AND title_s:Uploads AND has_model_s:info\\:fedora/afmodel\\:DILCollection"
|
176
|
+
ActiveFedora::SolrService.query(query, {:fl=>'id title_t'})
|
177
|
+
end
|
178
|
+
|
179
|
+
def get_details_collection
|
180
|
+
query="rightsMetadata_edit_access_machine_person_t:#{uid} AND title_s:Details AND has_model_s:info\\:fedora/afmodel\\:DILCollection"
|
181
|
+
ActiveFedora::SolrService.query(query, {:fl=>'id title_t'})
|
182
|
+
end
|
183
|
+
|
184
|
+
def collections
|
185
|
+
query="rightsMetadata_edit_access_machine_person_t:#{uid} AND NOT title_t:Uploads AND NOT title_t:Details AND has_model_s:info\\:fedora/afmodel\\:DILCollection"
|
186
|
+
ActiveFedora::SolrService.query(query, {:fl=>'id title_t'})
|
187
|
+
end
|
188
|
+
|
189
|
+
def existing_folder_item_for (document_id)
|
190
|
+
self.folders.find do |fldr|
|
191
|
+
fldr.folder_items.find do |fldr_itm|
|
192
|
+
return fldr_itm if fldr_itm.document_id == document_id
|
193
|
+
end
|
194
|
+
end
|
195
|
+
end
|
196
|
+
|
197
|
+
def superuser?
|
198
|
+
roles.where(name: 'superuser').exists?
|
199
|
+
end
|
200
|
+
|
201
|
+
def permanent_account?
|
202
|
+
return self.provider != 'digital_stacks_temporary'
|
203
|
+
end
|
204
|
+
|
205
|
+
def email_not_required?
|
206
|
+
if self.provider != 'digital_stacks_temporary' and self.provider != 'polaris'
|
207
|
+
return true
|
208
|
+
end
|
209
|
+
return false
|
210
|
+
end
|
211
|
+
|
212
|
+
end
|
213
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
#By default, devise requires an email to be unique. I want the email checks but need to remove the uniqueness...
|
2
|
+
module Bpluser::Validatable
|
3
|
+
#DEPRECATED TO BE REMOVED UPON RELAESE OF NEXT VERSION IN FAVOR OF CONCERNS
|
4
|
+
# Validatable creates all needed validations for a user email and password.
|
5
|
+
# It's optional, given you may want to create the validations by yourself.
|
6
|
+
# Automatically validate if the email is present, unique and its format is
|
7
|
+
# valid. Also tests presence of password, confirmation and length.
|
8
|
+
#
|
9
|
+
# == Options
|
10
|
+
#
|
11
|
+
# Validatable adds the following options to devise_for:
|
12
|
+
#
|
13
|
+
# * +email_regexp+: the regular expression used to validate e-mails;
|
14
|
+
# * +password_length+: a range expressing password length. Defaults to 8..72.
|
15
|
+
#
|
16
|
+
# All validations used by this module.
|
17
|
+
|
18
|
+
VALIDATIONS = [:validates_presence_of, :validates_format_of,
|
19
|
+
:validates_confirmation_of, :validates_length_of].freeze
|
20
|
+
|
21
|
+
def self.required_fields(klass)
|
22
|
+
[]
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.included(base)
|
26
|
+
base.extend ClassMethods
|
27
|
+
assert_validations_api!(base)
|
28
|
+
|
29
|
+
base.class_eval do
|
30
|
+
validates_presence_of :email, if: [:email_required?, :email_not_required?]
|
31
|
+
#validates_uniqueness_of :email, allow_blank: true, if: :email_changed?
|
32
|
+
validates_format_of :email, with: email_regexp, allow_blank: true, if: [:email_changed?, :email_not_required?]
|
33
|
+
|
34
|
+
validates_presence_of :password, if: :password_required?
|
35
|
+
validates_confirmation_of :password, if: :password_required?
|
36
|
+
validates_length_of :password, within: password_length, allow_blank: true
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.assert_validations_api!(base) #:nodoc:
|
41
|
+
unavailable_validations = VALIDATIONS.select { |v| !base.respond_to?(v) }
|
42
|
+
|
43
|
+
unless unavailable_validations.empty?
|
44
|
+
raise "Could not use :validatable module since #{base} does not respond " <<
|
45
|
+
"to the following methods: #{unavailable_validations.to_sentence}."
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
protected
|
50
|
+
|
51
|
+
# Checks whether a password is needed or not. For validations only.
|
52
|
+
# Passwords are always required if it's a new record, or if the password
|
53
|
+
# or confirmation are being set somewhere.
|
54
|
+
def password_required?
|
55
|
+
!persisted? || !password.nil? || !password_confirmation.nil?
|
56
|
+
end
|
57
|
+
|
58
|
+
def email_required?
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
module ClassMethods
|
63
|
+
::Devise::Models.config(self, :email_regexp, :password_length)
|
64
|
+
end
|
65
|
+
end
|
data/lib/bpluser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bpluser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boston Public Library Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-01-
|
11
|
+
date: 2019-01-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -138,6 +138,9 @@ dependencies:
|
|
138
138
|
name: bundler
|
139
139
|
requirement: !ruby/object:Gem::Requirement
|
140
140
|
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: '1.3'
|
141
144
|
- - ">="
|
142
145
|
- !ruby/object:Gem::Version
|
143
146
|
version: 1.3.0
|
@@ -145,6 +148,9 @@ dependencies:
|
|
145
148
|
prerelease: false
|
146
149
|
version_requirements: !ruby/object:Gem::Requirement
|
147
150
|
requirements:
|
151
|
+
- - "~>"
|
152
|
+
- !ruby/object:Gem::Version
|
153
|
+
version: '1.3'
|
148
154
|
- - ">="
|
149
155
|
- !ruby/object:Gem::Version
|
150
156
|
version: 1.3.0
|
@@ -152,16 +158,22 @@ dependencies:
|
|
152
158
|
name: rake
|
153
159
|
requirement: !ruby/object:Gem::Requirement
|
154
160
|
requirements:
|
161
|
+
- - "~>"
|
162
|
+
- !ruby/object:Gem::Version
|
163
|
+
version: '12.3'
|
155
164
|
- - ">="
|
156
165
|
- !ruby/object:Gem::Version
|
157
|
-
version:
|
166
|
+
version: 12.3.0
|
158
167
|
type: :development
|
159
168
|
prerelease: false
|
160
169
|
version_requirements: !ruby/object:Gem::Requirement
|
161
170
|
requirements:
|
171
|
+
- - "~>"
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '12.3'
|
162
174
|
- - ">="
|
163
175
|
- !ruby/object:Gem::Version
|
164
|
-
version:
|
176
|
+
version: 12.3.0
|
165
177
|
- !ruby/object:Gem::Dependency
|
166
178
|
name: active-fedora
|
167
179
|
requirement: !ruby/object:Gem::Requirement
|
@@ -214,44 +226,45 @@ dependencies:
|
|
214
226
|
name: awesome_print
|
215
227
|
requirement: !ruby/object:Gem::Requirement
|
216
228
|
requirements:
|
217
|
-
- - "
|
229
|
+
- - "~>"
|
218
230
|
- !ruby/object:Gem::Version
|
219
|
-
version: '
|
231
|
+
version: '1.8'
|
220
232
|
type: :development
|
221
233
|
prerelease: false
|
222
234
|
version_requirements: !ruby/object:Gem::Requirement
|
223
235
|
requirements:
|
224
|
-
- - "
|
236
|
+
- - "~>"
|
225
237
|
- !ruby/object:Gem::Version
|
226
|
-
version: '
|
238
|
+
version: '1.8'
|
227
239
|
- !ruby/object:Gem::Dependency
|
228
240
|
name: sqlite3
|
229
241
|
requirement: !ruby/object:Gem::Requirement
|
230
242
|
requirements:
|
243
|
+
- - "~>"
|
244
|
+
- !ruby/object:Gem::Version
|
245
|
+
version: '1.3'
|
231
246
|
- - ">="
|
232
247
|
- !ruby/object:Gem::Version
|
233
|
-
version:
|
248
|
+
version: 1.3.0
|
234
249
|
type: :development
|
235
250
|
prerelease: false
|
236
251
|
version_requirements: !ruby/object:Gem::Requirement
|
237
252
|
requirements:
|
253
|
+
- - "~>"
|
254
|
+
- !ruby/object:Gem::Version
|
255
|
+
version: '1.3'
|
238
256
|
- - ">="
|
239
257
|
- !ruby/object:Gem::Version
|
240
|
-
version:
|
258
|
+
version: 1.3.0
|
241
259
|
description: Shared user access gem of BPL
|
242
260
|
email:
|
243
261
|
- sanderson@bpl.org
|
244
262
|
- bbarber@bpl.org
|
245
|
-
executables:
|
246
|
-
- rails
|
247
|
-
- rspec
|
263
|
+
executables: []
|
248
264
|
extensions: []
|
249
265
|
extra_rdoc_files: []
|
250
266
|
files:
|
251
|
-
- ".gitignore"
|
252
|
-
- Gemfile
|
253
267
|
- MIT-LICENSE
|
254
|
-
- README.rdoc
|
255
268
|
- Rakefile
|
256
269
|
- app/controllers/bpluser/api_controller.rb
|
257
270
|
- app/controllers/bpluser/users/omniauth_callbacks_controller.rb
|
@@ -263,10 +276,9 @@ files:
|
|
263
276
|
- app/models/bpluser/concerns/validatable.rb
|
264
277
|
- app/models/bpluser/folder.rb
|
265
278
|
- app/models/bpluser/folder_item.rb
|
279
|
+
- app/models/bpluser/user.rb~
|
266
280
|
- app/models/bpluser/user_institution.rb
|
267
|
-
-
|
268
|
-
- bin/rspec
|
269
|
-
- bpluser.gemspec
|
281
|
+
- app/models/bpluser/validatable.rb~
|
270
282
|
- config/routes.rb
|
271
283
|
- lib/bpluser.rb
|
272
284
|
- lib/bpluser/engine.rb
|
@@ -290,76 +302,9 @@ files:
|
|
290
302
|
- lib/generators/bpluser/templates/views/devise/registrations/new.html.erb
|
291
303
|
- lib/generators/bpluser/templates/views/devise/sessions/new.html.erb
|
292
304
|
- lib/tasks/bpluser_tasks.rake
|
293
|
-
- spec/dummy/.ruby-version
|
294
|
-
- spec/dummy/Rakefile
|
295
|
-
- spec/dummy/app/assets/config/manifest.js
|
296
|
-
- spec/dummy/app/assets/images/.keep
|
297
|
-
- spec/dummy/app/assets/javascripts/application.js
|
298
|
-
- spec/dummy/app/assets/javascripts/cable.js
|
299
|
-
- spec/dummy/app/assets/javascripts/channels/.keep
|
300
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
301
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
302
|
-
- spec/dummy/app/channels/application_cable/connection.rb
|
303
|
-
- spec/dummy/app/controllers/application_controller.rb
|
304
|
-
- spec/dummy/app/controllers/concerns/.keep
|
305
|
-
- spec/dummy/app/helpers/application_helper.rb
|
306
|
-
- spec/dummy/app/jobs/application_job.rb
|
307
|
-
- spec/dummy/app/mailers/application_mailer.rb
|
308
|
-
- spec/dummy/app/models/application_record.rb
|
309
|
-
- spec/dummy/app/models/concerns/.keep
|
310
|
-
- spec/dummy/app/models/user.rb
|
311
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
312
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
313
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
314
|
-
- spec/dummy/bin/bundle
|
315
|
-
- spec/dummy/bin/rails
|
316
|
-
- spec/dummy/bin/rake
|
317
|
-
- spec/dummy/bin/setup
|
318
|
-
- spec/dummy/bin/update
|
319
|
-
- spec/dummy/bin/yarn
|
320
|
-
- spec/dummy/config.ru
|
321
|
-
- spec/dummy/config/application.rb
|
322
|
-
- spec/dummy/config/boot.rb
|
323
|
-
- spec/dummy/config/cable.yml
|
324
|
-
- spec/dummy/config/environment.rb
|
325
|
-
- spec/dummy/config/environments/development.rb
|
326
|
-
- spec/dummy/config/environments/production.rb
|
327
|
-
- spec/dummy/config/environments/test.rb
|
328
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
329
|
-
- spec/dummy/config/initializers/assets.rb
|
330
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
331
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
332
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
333
|
-
- spec/dummy/config/initializers/devise.rb
|
334
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
335
|
-
- spec/dummy/config/initializers/inflections.rb
|
336
|
-
- spec/dummy/config/initializers/mime_types.rb
|
337
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
338
|
-
- spec/dummy/config/locales/devise.en.yml
|
339
|
-
- spec/dummy/config/locales/en.yml
|
340
|
-
- spec/dummy/config/puma.rb
|
341
|
-
- spec/dummy/config/routes.rb
|
342
|
-
- spec/dummy/config/spring.rb
|
343
|
-
- spec/dummy/config/storage.yml
|
344
|
-
- spec/dummy/db/migrate/20181231191301_create_users.rb
|
345
|
-
- spec/dummy/db/schema.rb
|
346
|
-
- spec/dummy/lib/assets/.keep
|
347
|
-
- spec/dummy/log/.keep
|
348
|
-
- spec/dummy/package.json
|
349
|
-
- spec/dummy/public/404.html
|
350
|
-
- spec/dummy/public/422.html
|
351
|
-
- spec/dummy/public/500.html
|
352
|
-
- spec/dummy/public/apple-touch-icon-precomposed.png
|
353
|
-
- spec/dummy/public/apple-touch-icon.png
|
354
|
-
- spec/dummy/public/favicon.ico
|
355
|
-
- spec/dummy/spec/models/user_spec.rb
|
356
|
-
- spec/dummy/storage/.keep
|
357
|
-
- spec/dummy/tmp/.keep
|
358
|
-
- spec/dummy/tmp/storage/.keep
|
359
|
-
- spec/rails_helper.rb
|
360
|
-
- spec/spec_helper.rb
|
361
305
|
homepage: http://www.bpl.org
|
362
|
-
licenses:
|
306
|
+
licenses:
|
307
|
+
- MIT
|
363
308
|
metadata: {}
|
364
309
|
post_install_message:
|
365
310
|
rdoc_options: []
|
@@ -381,72 +326,4 @@ rubygems_version: 2.6.14.3
|
|
381
326
|
signing_key:
|
382
327
|
specification_version: 4
|
383
328
|
summary: Shared user access gem of BPL
|
384
|
-
test_files:
|
385
|
-
- spec/dummy/.ruby-version
|
386
|
-
- spec/dummy/Rakefile
|
387
|
-
- spec/dummy/app/assets/config/manifest.js
|
388
|
-
- spec/dummy/app/assets/images/.keep
|
389
|
-
- spec/dummy/app/assets/javascripts/application.js
|
390
|
-
- spec/dummy/app/assets/javascripts/cable.js
|
391
|
-
- spec/dummy/app/assets/javascripts/channels/.keep
|
392
|
-
- spec/dummy/app/assets/stylesheets/application.css
|
393
|
-
- spec/dummy/app/channels/application_cable/channel.rb
|
394
|
-
- spec/dummy/app/channels/application_cable/connection.rb
|
395
|
-
- spec/dummy/app/controllers/application_controller.rb
|
396
|
-
- spec/dummy/app/controllers/concerns/.keep
|
397
|
-
- spec/dummy/app/helpers/application_helper.rb
|
398
|
-
- spec/dummy/app/jobs/application_job.rb
|
399
|
-
- spec/dummy/app/mailers/application_mailer.rb
|
400
|
-
- spec/dummy/app/models/application_record.rb
|
401
|
-
- spec/dummy/app/models/concerns/.keep
|
402
|
-
- spec/dummy/app/models/user.rb
|
403
|
-
- spec/dummy/app/views/layouts/application.html.erb
|
404
|
-
- spec/dummy/app/views/layouts/mailer.html.erb
|
405
|
-
- spec/dummy/app/views/layouts/mailer.text.erb
|
406
|
-
- spec/dummy/bin/bundle
|
407
|
-
- spec/dummy/bin/rails
|
408
|
-
- spec/dummy/bin/rake
|
409
|
-
- spec/dummy/bin/setup
|
410
|
-
- spec/dummy/bin/update
|
411
|
-
- spec/dummy/bin/yarn
|
412
|
-
- spec/dummy/config.ru
|
413
|
-
- spec/dummy/config/application.rb
|
414
|
-
- spec/dummy/config/boot.rb
|
415
|
-
- spec/dummy/config/cable.yml
|
416
|
-
- spec/dummy/config/environment.rb
|
417
|
-
- spec/dummy/config/environments/development.rb
|
418
|
-
- spec/dummy/config/environments/production.rb
|
419
|
-
- spec/dummy/config/environments/test.rb
|
420
|
-
- spec/dummy/config/initializers/application_controller_renderer.rb
|
421
|
-
- spec/dummy/config/initializers/assets.rb
|
422
|
-
- spec/dummy/config/initializers/backtrace_silencers.rb
|
423
|
-
- spec/dummy/config/initializers/content_security_policy.rb
|
424
|
-
- spec/dummy/config/initializers/cookies_serializer.rb
|
425
|
-
- spec/dummy/config/initializers/devise.rb
|
426
|
-
- spec/dummy/config/initializers/filter_parameter_logging.rb
|
427
|
-
- spec/dummy/config/initializers/inflections.rb
|
428
|
-
- spec/dummy/config/initializers/mime_types.rb
|
429
|
-
- spec/dummy/config/initializers/wrap_parameters.rb
|
430
|
-
- spec/dummy/config/locales/devise.en.yml
|
431
|
-
- spec/dummy/config/locales/en.yml
|
432
|
-
- spec/dummy/config/puma.rb
|
433
|
-
- spec/dummy/config/routes.rb
|
434
|
-
- spec/dummy/config/spring.rb
|
435
|
-
- spec/dummy/config/storage.yml
|
436
|
-
- spec/dummy/db/migrate/20181231191301_create_users.rb
|
437
|
-
- spec/dummy/db/schema.rb
|
438
|
-
- spec/dummy/lib/assets/.keep
|
439
|
-
- spec/dummy/log/.keep
|
440
|
-
- spec/dummy/package.json
|
441
|
-
- spec/dummy/public/404.html
|
442
|
-
- spec/dummy/public/422.html
|
443
|
-
- spec/dummy/public/500.html
|
444
|
-
- spec/dummy/public/apple-touch-icon-precomposed.png
|
445
|
-
- spec/dummy/public/apple-touch-icon.png
|
446
|
-
- spec/dummy/public/favicon.ico
|
447
|
-
- spec/dummy/spec/models/user_spec.rb
|
448
|
-
- spec/dummy/storage/.keep
|
449
|
-
- spec/dummy/tmp/.keep
|
450
|
-
- spec/dummy/tmp/storage/.keep
|
451
|
-
- spec/rails_helper.rb
|
452
|
-
- spec/spec_helper.rb
|
329
|
+
test_files: []
|
data/.gitignore
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
# Generated by default by Github #
|
2
|
-
##################################
|
3
|
-
*.rbc
|
4
|
-
*.sassc
|
5
|
-
.sass-cache
|
6
|
-
capybara-*.html
|
7
|
-
.rspec
|
8
|
-
/.bundle
|
9
|
-
/vendor/bundle
|
10
|
-
/log/*
|
11
|
-
/tmp/*
|
12
|
-
/db/*.sqlite3
|
13
|
-
/public/system/*
|
14
|
-
/coverage/
|
15
|
-
/spec/tmp/*
|
16
|
-
**.orig
|
17
|
-
rerun.txt
|
18
|
-
pickle-email-*.html
|
19
|
-
|
20
|
-
# Specific configuration files #
|
21
|
-
################################
|
22
|
-
database.yml
|
23
|
-
fedora.yml
|
24
|
-
solr.yml
|
25
|
-
role_map_cucumber.yml
|
26
|
-
role_map_development.yml
|
27
|
-
role_map_production.yml
|
28
|
-
role_map_test.yml
|
29
|
-
ark.yml
|
30
|
-
bpl_config.yml
|
31
|
-
|
32
|
-
# Files to ignore by default in Git #
|
33
|
-
#####################################
|
34
|
-
*.pdf
|
35
|
-
*.db
|
36
|
-
*.jar
|
37
|
-
*.gz
|
38
|
-
*.tar
|
39
|
-
*.zip
|
40
|
-
*.dll
|
41
|
-
*.sqlite
|
42
|
-
*.sql
|
43
|
-
*.sqlite3
|
44
|
-
*.log
|
45
|
-
# Specific Files to ignore #
|
46
|
-
############################
|
47
|
-
Thumbs.db
|
48
|
-
Icon?
|
49
|
-
.DS_Store?
|
50
|
-
.DS_Store
|
51
|
-
ehthumbs.db
|
52
|
-
.idea # Rubymine config files
|
53
|
-
/.idea/*
|
54
|
-
Gemfile.lock
|
55
|
-
|
56
|
-
# Directories to ignore #
|
57
|
-
#########################
|
58
|
-
/public/data/*
|
59
|
-
/public/batch_uploads/*
|
60
|
-
/jetty/*
|
61
|
-
/solr_conf/*
|
62
|
-
/fedora_conf/*
|
63
|
-
/hydra-jetty/*
|
64
|
-
/*jetty*
|
65
|
-
/pkg/*
|
66
|
-
|
67
|
-
# Ignore edited Linux files #
|
68
|
-
#############################
|
69
|
-
|
70
|
-
*~
|
data/Gemfile
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
source "https://rubygems.org"
|
2
|
-
|
3
|
-
# Declare your gem's dependencies in bpluser.gemspec.
|
4
|
-
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
-
# development dependencies will be added by default to the :development group.
|
6
|
-
gemspec
|
7
|
-
gem 'bootsnap', require: false
|
8
|
-
# jquery-rails is used by the dummy application
|
9
|
-
group :development, :test do
|
10
|
-
gem "jquery-rails"
|
11
|
-
end
|
12
|
-
|
13
|
-
# Declare any dependencies that are still in development here instead of in
|
14
|
-
# your gemspec. These might include edge Rails or gems from your path or
|
15
|
-
# Git. Remember to move these dependencies to your gemspec before releasing
|
16
|
-
# your gem to rubygems.org.
|
17
|
-
|
18
|
-
# To use debugger
|
19
|
-
# gem 'debugger'
|
data/README.rdoc
DELETED
data/bin/rails
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails gems
|
3
|
-
# installed from the root of your application.
|
4
|
-
|
5
|
-
ENGINE_ROOT = File.expand_path('..', __dir__)
|
6
|
-
ENGINE_PATH = File.expand_path('../lib/bpluser/engine', __dir__)
|
7
|
-
APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
|
8
|
-
# Set up gems listed in the Gemfile.
|
9
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
|
10
|
-
require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
|
11
|
-
|
12
|
-
require 'rails/all'
|
13
|
-
require 'rails/engine/commands'
|