apicasso 0.7.2 → 0.7.3
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/app/models/apicasso/ability.rb +10 -10
- data/lib/apicasso/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4d49aff8f19428f795c3314f7392690fc19478c045c6335ecbc07b443ed0e940
|
|
4
|
+
data.tar.gz: 5547a18da6f13ed6081b4dceacddab92c2ab20276f6475f24f7cc54d6a3617c9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96ebb610eb87f3f2732a33857dba5c021202c3658233b799bf5371239bf4605a06c0635ad5629d5018e626ea8fc54567cee2d3e31d40df720856d352b1db0283
|
|
7
|
+
data.tar.gz: afff80a773fbd29b7283d17bade1351df96b90e512112bc5ed0dd10d7e9ad8fbb11e9528e0248796eae749b85dba399e70e556fd2e488bf0eb45fa6f6a51fd89
|
|
@@ -44,17 +44,17 @@ module Apicasso
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
end
|
|
47
|
-
end
|
|
48
47
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
48
|
+
# Given a permission, a class and a hash of clearance conditions
|
|
49
|
+
# builds permissions for the current ability.
|
|
50
|
+
# Usage:
|
|
51
|
+
# To have a key reading all banners from a channel with id 999
|
|
52
|
+
# you would have a scope:
|
|
53
|
+
# => `{read: {banner: {owner_id: [999]}}}`
|
|
54
|
+
def clear_for(permission, klass, clearance)
|
|
55
|
+
clearance.to_h.each do |by_field, values|
|
|
56
|
+
can permission, klass, by_field.to_sym => values
|
|
57
|
+
end
|
|
58
58
|
end
|
|
59
59
|
end
|
|
60
60
|
end
|
data/lib/apicasso/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: apicasso
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.7.
|
|
4
|
+
version: 0.7.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fernando Bellincanta
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-
|
|
11
|
+
date: 2019-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|