card-mod-permissions 0.13.1 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/locales/de.yml +2 -0
- data/locales/en.yml +2 -0
- data/set/abstract/permission.rb +1 -1
- data/set/all/permissions.rb +3 -1
- data/set/right/read.rb +2 -6
- metadata +7 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7672416f42ebf1a11bf645e5b60b69421cf2eca57724d9991a7b1185a92e50fe
|
4
|
+
data.tar.gz: 8cc41c129845ff497b2bad2e9b4c8b62ce758a428c1165c4e527f53586a33e01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d6262e9e05d13be86e9a7b3f6aaa1da836ddbdbb56548dee5d0daaf470dda4d63a7f49c1d7196f8714d54db365dc2a44cb2994ee6c2f29ab017628c4cf16c8d
|
7
|
+
data.tar.gz: b0c6f8f744c6345990998c551e1e74a83c45a1c8ea1f2cf2253b5009e935120946703fed2d93c1cdb5825dcd0140d586152dc14b12e6950c6b32fba61033390d
|
data/locales/de.yml
ADDED
data/locales/en.yml
ADDED
data/set/abstract/permission.rb
CHANGED
data/set/all/permissions.rb
CHANGED
@@ -21,6 +21,8 @@ end
|
|
21
21
|
# trait: :account would fetch this card plus a tag codenamed :account
|
22
22
|
# trait: :roles, new: {} would initialize a new card with default ({})
|
23
23
|
# options.
|
24
|
+
#
|
25
|
+
#
|
24
26
|
|
25
27
|
def ok? action
|
26
28
|
@ok ||= {}
|
@@ -184,7 +186,7 @@ def each_field_as_bot &block
|
|
184
186
|
# (because of *type plus right)
|
185
187
|
# skip if name is updated because will already be resaved
|
186
188
|
Auth.as_bot do
|
187
|
-
|
189
|
+
field_cards.compact.each(&block)
|
188
190
|
end
|
189
191
|
end
|
190
192
|
|
data/set/right/read.rb
CHANGED
@@ -29,7 +29,7 @@ def update_read_rules_of_set_members
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def member_has_overriding_rule? member
|
32
|
-
pattern_index(
|
32
|
+
pattern_index(member.read_rule_class.card_id) < rule_pattern_index
|
33
33
|
end
|
34
34
|
|
35
35
|
# cards with this card as a read_rule_id
|
@@ -61,11 +61,7 @@ def rule_pattern_index
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def pattern_index pattern_id
|
64
|
-
|
65
|
-
end
|
66
|
-
|
67
|
-
def pattern_ids
|
68
|
-
@pattern_ids ||= set_patterns.map(&:pattern_id)
|
64
|
+
Pattern.ids.index(pattern_id) || invalid_pattern_id(pattern_id)
|
69
65
|
end
|
70
66
|
|
71
67
|
def invalid_pattern_id pattern_id
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-permissions
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan McCutchen
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2021-
|
13
|
+
date: 2021-12-22 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,14 +18,14 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.
|
21
|
+
version: 1.104.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
requirements:
|
26
26
|
- - '='
|
27
27
|
- !ruby/object:Gem::Version
|
28
|
-
version: 1.
|
28
|
+
version: 1.104.0
|
29
29
|
description: ''
|
30
30
|
email:
|
31
31
|
- info@decko.org
|
@@ -33,6 +33,8 @@ executables: []
|
|
33
33
|
extensions: []
|
34
34
|
extra_rdoc_files: []
|
35
35
|
files:
|
36
|
+
- locales/de.yml
|
37
|
+
- locales/en.yml
|
36
38
|
- set/abstract/permission.rb
|
37
39
|
- set/all/permissions.rb
|
38
40
|
- set/all/update_read_rules.rb
|
@@ -69,7 +71,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
71
|
- !ruby/object:Gem::Version
|
70
72
|
version: '0'
|
71
73
|
requirements: []
|
72
|
-
rubygems_version: 3.
|
74
|
+
rubygems_version: 3.2.15
|
73
75
|
signing_key:
|
74
76
|
specification_version: 4
|
75
77
|
summary: decko permissions
|