jsonapi-authorization 1.0.0.alpha6 → 1.0.0.beta1
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/.all-contributorsrc +13 -1
- data/.gitignore +1 -0
- data/.rubocop.yml +1 -0
- data/.travis.yml +7 -5
- data/Gemfile +0 -2
- data/README.md +18 -11
- data/docs/relationship-authorization.md +601 -0
- data/jsonapi-authorization.gemspec +7 -6
- data/lib/jsonapi/authorization/authorizing_processor.rb +42 -26
- data/lib/jsonapi/authorization/default_pundit_authorizer.rb +66 -29
- data/lib/jsonapi/authorization/version.rb +2 -1
- metadata +38 -24
- data/.ruby-version +0 -1
@@ -21,13 +21,14 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.add_dependency "pundit", "~> 1.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.11"
|
24
|
-
spec.add_development_dependency "rake", "~>
|
24
|
+
spec.add_development_dependency "rake", "~> 12.0"
|
25
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
26
|
-
spec.add_development_dependency "rspec-rails", "~> 3.
|
27
|
-
spec.add_development_dependency "pry"
|
28
|
-
spec.add_development_dependency "pry-byebug"
|
29
|
-
spec.add_development_dependency "pry-doc"
|
30
|
-
spec.add_development_dependency "pry-rails"
|
26
|
+
spec.add_development_dependency "rspec-rails", "~> 3.7"
|
27
|
+
spec.add_development_dependency "pry"
|
28
|
+
spec.add_development_dependency "pry-byebug"
|
29
|
+
spec.add_development_dependency "pry-doc"
|
30
|
+
spec.add_development_dependency "pry-rails"
|
31
31
|
spec.add_development_dependency "rubocop", "~> 0.36.0"
|
32
32
|
spec.add_development_dependency "phare", "~> 0.7.1"
|
33
|
+
spec.add_development_dependency "sqlite3"
|
33
34
|
end
|
@@ -49,7 +49,7 @@ module JSONAPI
|
|
49
49
|
end
|
50
50
|
|
51
51
|
def authorize_find
|
52
|
-
authorizer.find(@resource_klass._model_class)
|
52
|
+
authorizer.find(source_class: @resource_klass._model_class)
|
53
53
|
end
|
54
54
|
|
55
55
|
def authorize_show
|
@@ -58,7 +58,7 @@ module JSONAPI
|
|
58
58
|
context: context
|
59
59
|
)._model
|
60
60
|
|
61
|
-
authorizer.show(record)
|
61
|
+
authorizer.show(source_record: record)
|
62
62
|
end
|
63
63
|
|
64
64
|
def authorize_show_relationship
|
@@ -81,7 +81,7 @@ module JSONAPI
|
|
81
81
|
|
82
82
|
parent_record = parent_resource._model
|
83
83
|
related_record = related_resource._model unless related_resource.nil?
|
84
|
-
authorizer.show_relationship(parent_record, related_record)
|
84
|
+
authorizer.show_relationship(source_record: parent_record, related_record: related_record)
|
85
85
|
end
|
86
86
|
|
87
87
|
def authorize_show_related_resource
|
@@ -95,7 +95,9 @@ module JSONAPI
|
|
95
95
|
|
96
96
|
source_record = source_resource._model
|
97
97
|
related_record = related_resource._model unless related_resource.nil?
|
98
|
-
authorizer.show_related_resource(
|
98
|
+
authorizer.show_related_resource(
|
99
|
+
source_record: source_record, related_record: related_record
|
100
|
+
)
|
99
101
|
end
|
100
102
|
|
101
103
|
def authorize_show_related_resources
|
@@ -104,7 +106,7 @@ module JSONAPI
|
|
104
106
|
context: context
|
105
107
|
)._model
|
106
108
|
|
107
|
-
authorizer.show_related_resources(source_record)
|
109
|
+
authorizer.show_related_resources(source_record: source_record)
|
108
110
|
end
|
109
111
|
|
110
112
|
def authorize_replace_fields
|
@@ -112,12 +114,18 @@ module JSONAPI
|
|
112
114
|
params[:resource_id],
|
113
115
|
context: context
|
114
116
|
)._model
|
115
|
-
authorizer.replace_fields(
|
117
|
+
authorizer.replace_fields(
|
118
|
+
source_record: source_record,
|
119
|
+
related_records_with_context: related_models_with_context
|
120
|
+
)
|
116
121
|
end
|
117
122
|
|
118
123
|
def authorize_create_resource
|
119
124
|
source_class = resource_klass._model_class
|
120
|
-
authorizer.create_resource(
|
125
|
+
authorizer.create_resource(
|
126
|
+
source_class: source_class,
|
127
|
+
related_records_with_context: related_models_with_context
|
128
|
+
)
|
121
129
|
end
|
122
130
|
|
123
131
|
def authorize_remove_resource
|
@@ -126,7 +134,7 @@ module JSONAPI
|
|
126
134
|
context: context
|
127
135
|
)._model
|
128
136
|
|
129
|
-
authorizer.remove_resource(record)
|
137
|
+
authorizer.remove_resource(source_record: record)
|
130
138
|
end
|
131
139
|
|
132
140
|
def authorize_replace_to_one_relationship
|
@@ -149,9 +157,9 @@ module JSONAPI
|
|
149
157
|
new_related_record = new_related_resource._model unless new_related_resource.nil?
|
150
158
|
|
151
159
|
authorizer.replace_to_one_relationship(
|
152
|
-
source_record,
|
153
|
-
new_related_record,
|
154
|
-
relationship_type
|
160
|
+
source_record: source_record,
|
161
|
+
new_related_record: new_related_record,
|
162
|
+
relationship_type: relationship_type
|
155
163
|
)
|
156
164
|
end
|
157
165
|
|
@@ -164,7 +172,11 @@ module JSONAPI
|
|
164
172
|
relationship_type = params[:relationship_type].to_sym
|
165
173
|
related_models = model_class_for_relationship(relationship_type).find(params[:data])
|
166
174
|
|
167
|
-
authorizer.create_to_many_relationship(
|
175
|
+
authorizer.create_to_many_relationship(
|
176
|
+
source_record: source_record,
|
177
|
+
new_related_records: related_models,
|
178
|
+
relationship_type: relationship_type
|
179
|
+
)
|
168
180
|
end
|
169
181
|
|
170
182
|
def authorize_replace_to_many_relationships
|
@@ -178,9 +190,9 @@ module JSONAPI
|
|
178
190
|
new_related_records = model_class_for_relationship(relationship_type).find(params[:data])
|
179
191
|
|
180
192
|
authorizer.replace_to_many_relationship(
|
181
|
-
source_record,
|
182
|
-
new_related_records,
|
183
|
-
relationship_type
|
193
|
+
source_record: source_record,
|
194
|
+
new_related_records: new_related_records,
|
195
|
+
relationship_type: relationship_type
|
184
196
|
)
|
185
197
|
end
|
186
198
|
|
@@ -204,9 +216,9 @@ module JSONAPI
|
|
204
216
|
related_records = related_resources.map(&:_model)
|
205
217
|
|
206
218
|
authorizer.remove_to_many_relationship(
|
207
|
-
source_record,
|
208
|
-
related_records,
|
209
|
-
relationship_type
|
219
|
+
source_record: source_record,
|
220
|
+
related_records: related_records,
|
221
|
+
relationship_type: relationship_type
|
210
222
|
)
|
211
223
|
end
|
212
224
|
|
@@ -218,7 +230,9 @@ module JSONAPI
|
|
218
230
|
|
219
231
|
relationship_type = params[:relationship_type].to_sym
|
220
232
|
|
221
|
-
authorizer.remove_to_one_relationship(
|
233
|
+
authorizer.remove_to_one_relationship(
|
234
|
+
source_record: source_record, relationship_type: relationship_type
|
235
|
+
)
|
222
236
|
end
|
223
237
|
|
224
238
|
def authorize_replace_polymorphic_to_one_relationship
|
@@ -248,16 +262,16 @@ module JSONAPI
|
|
248
262
|
|
249
263
|
relationship_type = params[:relationship_type].to_sym
|
250
264
|
authorizer.replace_to_one_relationship(
|
251
|
-
source_record,
|
252
|
-
new_related_record,
|
253
|
-
relationship_type
|
265
|
+
source_record: source_record,
|
266
|
+
new_related_record: new_related_record,
|
267
|
+
relationship_type: relationship_type
|
254
268
|
)
|
255
269
|
end
|
256
270
|
|
257
271
|
private
|
258
272
|
|
259
273
|
def authorizer
|
260
|
-
@authorizer ||= ::JSONAPI::Authorization.configuration.authorizer.new(context)
|
274
|
+
@authorizer ||= ::JSONAPI::Authorization.configuration.authorizer.new(context: context)
|
261
275
|
end
|
262
276
|
|
263
277
|
# TODO: Communicate with upstream to fix this nasty hack
|
@@ -367,11 +381,13 @@ module JSONAPI
|
|
367
381
|
relationship.relation_name(context: context)
|
368
382
|
)
|
369
383
|
return if related_record.nil?
|
370
|
-
authorizer.include_has_one_resource(
|
384
|
+
authorizer.include_has_one_resource(
|
385
|
+
source_record: source_record, related_record: related_record
|
386
|
+
)
|
371
387
|
when JSONAPI::Relationship::ToMany
|
372
388
|
authorizer.include_has_many_resource(
|
373
|
-
source_record,
|
374
|
-
relationship.resource_klass._model_class
|
389
|
+
source_record: source_record,
|
390
|
+
record_class: relationship.resource_klass._model_class
|
375
391
|
)
|
376
392
|
else
|
377
393
|
raise "Unexpected relationship type: #{relationship.inspect}"
|
@@ -18,7 +18,7 @@ module JSONAPI
|
|
18
18
|
# ==== Parameters
|
19
19
|
#
|
20
20
|
# * +context+ - The context passed down from the controller layer
|
21
|
-
def initialize(context)
|
21
|
+
def initialize(context:)
|
22
22
|
@user = JSONAPI::Authorization.configuration.user_context(context)
|
23
23
|
end
|
24
24
|
|
@@ -27,7 +27,7 @@ module JSONAPI
|
|
27
27
|
# ==== Parameters
|
28
28
|
#
|
29
29
|
# * +source_class+ - The source class (e.g. +Article+ for +ArticleResource+)
|
30
|
-
def find(source_class)
|
30
|
+
def find(source_class:)
|
31
31
|
::Pundit.authorize(user, source_class, 'index?')
|
32
32
|
end
|
33
33
|
|
@@ -36,7 +36,7 @@ module JSONAPI
|
|
36
36
|
# ==== Parameters
|
37
37
|
#
|
38
38
|
# * +source_record+ - The record to show
|
39
|
-
def show(source_record)
|
39
|
+
def show(source_record:)
|
40
40
|
::Pundit.authorize(user, source_record, 'show?')
|
41
41
|
end
|
42
42
|
|
@@ -51,7 +51,7 @@ module JSONAPI
|
|
51
51
|
# * +related_record+ - The associated +has_one+ record to show or +nil+
|
52
52
|
# if the associated record was not found. For a +has_many+ association,
|
53
53
|
# this will always be +nil+
|
54
|
-
def show_relationship(source_record
|
54
|
+
def show_relationship(source_record:, related_record:)
|
55
55
|
::Pundit.authorize(user, source_record, 'show?')
|
56
56
|
::Pundit.authorize(user, related_record, 'show?') unless related_record.nil?
|
57
57
|
end
|
@@ -65,7 +65,7 @@ module JSONAPI
|
|
65
65
|
# * +source_record+ - The record whose relationship is queried
|
66
66
|
# * +related_record+ - The associated record to show or +nil+ if the
|
67
67
|
# associated record was not found
|
68
|
-
def show_related_resource(source_record
|
68
|
+
def show_related_resource(source_record:, related_record:)
|
69
69
|
::Pundit.authorize(user, source_record, 'show?')
|
70
70
|
::Pundit.authorize(user, related_record, 'show?') unless related_record.nil?
|
71
71
|
end
|
@@ -77,7 +77,7 @@ module JSONAPI
|
|
77
77
|
# ==== Parameters
|
78
78
|
#
|
79
79
|
# * +source_record+ - The record whose relationship is queried
|
80
|
-
def show_related_resources(source_record)
|
80
|
+
def show_related_resources(source_record:)
|
81
81
|
::Pundit.authorize(user, source_record, 'show?')
|
82
82
|
end
|
83
83
|
|
@@ -88,9 +88,12 @@ module JSONAPI
|
|
88
88
|
# * +source_record+ - The record to be modified
|
89
89
|
# * +related_records_with_context+ - A hash with the association type,
|
90
90
|
# the relationship name, an Array of new related records.
|
91
|
-
def replace_fields(source_record
|
91
|
+
def replace_fields(source_record:, related_records_with_context:)
|
92
92
|
::Pundit.authorize(user, source_record, 'update?')
|
93
|
-
authorize_related_records(
|
93
|
+
authorize_related_records(
|
94
|
+
source_record: source_record,
|
95
|
+
related_records_with_context: related_records_with_context
|
96
|
+
)
|
94
97
|
end
|
95
98
|
|
96
99
|
# <tt>POST /resources</tt>
|
@@ -100,7 +103,7 @@ module JSONAPI
|
|
100
103
|
# * +source_class+ - The class of the record to be created
|
101
104
|
# * +related_records_with_context+ - A has with the association type,
|
102
105
|
# the relationship name, and an Array of new related records.
|
103
|
-
def create_resource(source_class
|
106
|
+
def create_resource(source_class:, related_records_with_context:)
|
104
107
|
::Pundit.authorize(user, source_class, 'create?')
|
105
108
|
related_records_with_context.each do |data|
|
106
109
|
relation_name = data[:relation_name]
|
@@ -127,7 +130,7 @@ module JSONAPI
|
|
127
130
|
# ==== Parameters
|
128
131
|
#
|
129
132
|
# * +source_record+ - The record to be removed
|
130
|
-
def remove_resource(source_record)
|
133
|
+
def remove_resource(source_record:)
|
131
134
|
::Pundit.authorize(user, source_record, 'destroy?')
|
132
135
|
end
|
133
136
|
|
@@ -140,9 +143,13 @@ module JSONAPI
|
|
140
143
|
# * +source_record+ - The record whose relationship is modified
|
141
144
|
# * +new_related_record+ - The new record replacing the old record
|
142
145
|
# * +relationship_type+ - The relationship type
|
143
|
-
def replace_to_one_relationship(source_record
|
146
|
+
def replace_to_one_relationship(source_record:, new_related_record:, relationship_type:)
|
144
147
|
relationship_method = "replace_#{relationship_type}?"
|
145
|
-
authorize_relationship_operation(
|
148
|
+
authorize_relationship_operation(
|
149
|
+
source_record: source_record,
|
150
|
+
relationship_method: relationship_method,
|
151
|
+
related_record_or_records: new_related_record
|
152
|
+
)
|
146
153
|
end
|
147
154
|
|
148
155
|
# <tt>POST /resources/:id/relationships/other-resources</tt>
|
@@ -154,9 +161,13 @@ module JSONAPI
|
|
154
161
|
# * +source_record+ - The record whose relationship is modified
|
155
162
|
# * +new_related_records+ - The new records to be added to the association
|
156
163
|
# * +relationship_type+ - The relationship type
|
157
|
-
def create_to_many_relationship(source_record
|
164
|
+
def create_to_many_relationship(source_record:, new_related_records:, relationship_type:)
|
158
165
|
relationship_method = "add_to_#{relationship_type}?"
|
159
|
-
authorize_relationship_operation(
|
166
|
+
authorize_relationship_operation(
|
167
|
+
source_record: source_record,
|
168
|
+
relationship_method: relationship_method,
|
169
|
+
related_record_or_records: new_related_records
|
170
|
+
)
|
160
171
|
end
|
161
172
|
|
162
173
|
# <tt>PATCH /resources/:id/relationships/other-resources</tt>
|
@@ -169,9 +180,13 @@ module JSONAPI
|
|
169
180
|
# * +new_related_records+ - The new records replacing the entire +has_many+
|
170
181
|
# association
|
171
182
|
# * +relationship_type+ - The relationship type
|
172
|
-
def replace_to_many_relationship(source_record
|
183
|
+
def replace_to_many_relationship(source_record:, new_related_records:, relationship_type:)
|
173
184
|
relationship_method = "replace_#{relationship_type}?"
|
174
|
-
authorize_relationship_operation(
|
185
|
+
authorize_relationship_operation(
|
186
|
+
source_record: source_record,
|
187
|
+
relationship_method: relationship_method,
|
188
|
+
related_record_or_records: new_related_records
|
189
|
+
)
|
175
190
|
end
|
176
191
|
|
177
192
|
# <tt>DELETE /resources/:id/relationships/other-resources</tt>
|
@@ -183,9 +198,13 @@ module JSONAPI
|
|
183
198
|
# * +source_record+ - The record whose relationship is modified
|
184
199
|
# * +related_records+ - The records which will be disassociated from +source_record+
|
185
200
|
# * +relationship_type+ - The relationship type
|
186
|
-
def remove_to_many_relationship(source_record
|
201
|
+
def remove_to_many_relationship(source_record:, related_records:, relationship_type:)
|
187
202
|
relationship_method = "remove_from_#{relationship_type}?"
|
188
|
-
authorize_relationship_operation(
|
203
|
+
authorize_relationship_operation(
|
204
|
+
source_record: source_record,
|
205
|
+
relationship_method: relationship_method,
|
206
|
+
related_record_or_records: related_records
|
207
|
+
)
|
189
208
|
end
|
190
209
|
|
191
210
|
# <tt>DELETE /resources/:id/relationships/another-resource</tt>
|
@@ -196,9 +215,12 @@ module JSONAPI
|
|
196
215
|
#
|
197
216
|
# * +source_record+ - The record whose relationship is modified
|
198
217
|
# * +relationship_type+ - The relationship type
|
199
|
-
def remove_to_one_relationship(source_record
|
218
|
+
def remove_to_one_relationship(source_record:, relationship_type:)
|
200
219
|
relationship_method = "remove_#{relationship_type}?"
|
201
|
-
authorize_relationship_operation(
|
220
|
+
authorize_relationship_operation(
|
221
|
+
source_record: source_record,
|
222
|
+
relationship_method: relationship_method
|
223
|
+
)
|
202
224
|
end
|
203
225
|
|
204
226
|
# Any request including <tt>?include=other-resources</tt>
|
@@ -216,9 +238,11 @@ module JSONAPI
|
|
216
238
|
# article.comments check
|
217
239
|
# * +record_class+ - The underlying record class for the relationships
|
218
240
|
# resource.
|
219
|
-
|
241
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
242
|
+
def include_has_many_resource(source_record:, record_class:)
|
220
243
|
::Pundit.authorize(user, record_class, 'index?')
|
221
244
|
end
|
245
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
222
246
|
|
223
247
|
# Any request including <tt>?include=another-resource</tt>
|
224
248
|
#
|
@@ -231,16 +255,18 @@ module JSONAPI
|
|
231
255
|
# * +source_record+ — The source relationship record, e.g. an Article in
|
232
256
|
# article.author check
|
233
257
|
# * +related_record+ - The associated record to return
|
234
|
-
|
258
|
+
# rubocop:disable Lint/UnusedMethodArgument
|
259
|
+
def include_has_one_resource(source_record:, related_record:)
|
235
260
|
::Pundit.authorize(user, related_record, 'show?')
|
236
261
|
end
|
262
|
+
# rubocop:enable Lint/UnusedMethodArgument
|
237
263
|
|
238
264
|
private
|
239
265
|
|
240
266
|
def authorize_relationship_operation(
|
241
|
-
source_record
|
242
|
-
relationship_method
|
243
|
-
related_record_or_records
|
267
|
+
source_record:,
|
268
|
+
relationship_method:,
|
269
|
+
related_record_or_records: nil
|
244
270
|
)
|
245
271
|
policy = ::Pundit.policy(user, source_record)
|
246
272
|
if policy.respond_to?(relationship_method)
|
@@ -261,19 +287,30 @@ module JSONAPI
|
|
261
287
|
end
|
262
288
|
end
|
263
289
|
|
264
|
-
def authorize_related_records(source_record
|
290
|
+
def authorize_related_records(source_record:, related_records_with_context:)
|
265
291
|
related_records_with_context.each do |data|
|
266
292
|
relation_type = data[:relation_type]
|
267
293
|
relation_name = data[:relation_name]
|
268
294
|
records = data[:records]
|
269
295
|
case relation_type
|
270
296
|
when :to_many
|
271
|
-
replace_to_many_relationship(
|
297
|
+
replace_to_many_relationship(
|
298
|
+
source_record: source_record,
|
299
|
+
new_related_records: records,
|
300
|
+
relationship_type: relation_name
|
301
|
+
)
|
272
302
|
when :to_one
|
273
303
|
if records.nil?
|
274
|
-
remove_to_one_relationship(
|
304
|
+
remove_to_one_relationship(
|
305
|
+
source_record: source_record,
|
306
|
+
relationship_type: relation_name
|
307
|
+
)
|
275
308
|
else
|
276
|
-
replace_to_one_relationship(
|
309
|
+
replace_to_one_relationship(
|
310
|
+
source_record: source_record,
|
311
|
+
new_related_record: records,
|
312
|
+
relationship_type: relation_name
|
313
|
+
)
|
277
314
|
end
|
278
315
|
end
|
279
316
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsonapi-authorization
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.0.
|
4
|
+
version: 1.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vesa Laakso
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-07-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jsonapi-resources
|
@@ -59,14 +59,14 @@ dependencies:
|
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '12.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '
|
69
|
+
version: '12.0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -87,70 +87,70 @@ dependencies:
|
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: '3.
|
90
|
+
version: '3.7'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: '3.
|
97
|
+
version: '3.7'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: pry
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0
|
104
|
+
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0
|
111
|
+
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: pry-byebug
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- - "
|
116
|
+
- - ">="
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- - "
|
123
|
+
- - ">="
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: pry-doc
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- - "
|
130
|
+
- - ">="
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0
|
132
|
+
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- - "
|
137
|
+
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: '0
|
139
|
+
version: '0'
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: pry-rails
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
|
-
- - "
|
144
|
+
- - ">="
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 0
|
146
|
+
version: '0'
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
|
-
- - "
|
151
|
+
- - ">="
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 0
|
153
|
+
version: '0'
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: rubocop
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -179,6 +179,20 @@ dependencies:
|
|
179
179
|
- - "~>"
|
180
180
|
- !ruby/object:Gem::Version
|
181
181
|
version: 0.7.1
|
182
|
+
- !ruby/object:Gem::Dependency
|
183
|
+
name: sqlite3
|
184
|
+
requirement: !ruby/object:Gem::Requirement
|
185
|
+
requirements:
|
186
|
+
- - ">="
|
187
|
+
- !ruby/object:Gem::Version
|
188
|
+
version: '0'
|
189
|
+
type: :development
|
190
|
+
prerelease: false
|
191
|
+
version_requirements: !ruby/object:Gem::Requirement
|
192
|
+
requirements:
|
193
|
+
- - ">="
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
182
196
|
description: Adds generic authorization to the jsonapi-resources gem using Pundit.
|
183
197
|
email:
|
184
198
|
- laakso.vesa@gmail.com
|
@@ -192,7 +206,6 @@ files:
|
|
192
206
|
- ".gitignore"
|
193
207
|
- ".rspec"
|
194
208
|
- ".rubocop.yml"
|
195
|
-
- ".ruby-version"
|
196
209
|
- ".travis.yml"
|
197
210
|
- Gemfile
|
198
211
|
- LICENSE.txt
|
@@ -202,6 +215,7 @@ files:
|
|
202
215
|
- bin/phare
|
203
216
|
- bin/rubocop
|
204
217
|
- bin/setup
|
218
|
+
- docs/relationship-authorization.md
|
205
219
|
- jsonapi-authorization.gemspec
|
206
220
|
- lib/jsonapi-authorization.rb
|
207
221
|
- lib/jsonapi/authorization.rb
|
@@ -230,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
230
244
|
version: 1.3.1
|
231
245
|
requirements: []
|
232
246
|
rubyforge_project:
|
233
|
-
rubygems_version: 2.
|
247
|
+
rubygems_version: 2.5.2
|
234
248
|
signing_key:
|
235
249
|
specification_version: 4
|
236
250
|
summary: Generic authorization for jsonapi-resources gem
|