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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: be2938bb3b439329481134efe791c3ef636b4bce6cd854ac11166abcba38ff31
4
- data.tar.gz: '09722a337e7de38fe1b879d58175007053803d0740e26ee1dc71efd528c171a0'
3
+ metadata.gz: 7672416f42ebf1a11bf645e5b60b69421cf2eca57724d9991a7b1185a92e50fe
4
+ data.tar.gz: 8cc41c129845ff497b2bad2e9b4c8b62ce758a428c1165c4e527f53586a33e01
5
5
  SHA512:
6
- metadata.gz: 8468257b16c81b077aa944e88a8f0708e70ba9e9e2acfcca49583a71ddf2707d8775ad6192fc43a7f31f44a07fc5616236d5a628ef273d8d2990fa8d1c8da150
7
- data.tar.gz: 2f7c25c87f16170e4b4441f89c5ed0b11fe105da5189e8071aa0fb985a5969019c8ab4977cefe80eeea1af9b881f9598c69ad79f2b39d58cb9e1ec7fd5ea44b8
6
+ metadata.gz: 7d6262e9e05d13be86e9a7b3f6aaa1da836ddbdbb56548dee5d0daaf470dda4d63a7f49c1d7196f8714d54db365dc2a44cb2994ee6c2f29ab017628c4cf16c8d
7
+ data.tar.gz: b0c6f8f744c6345990998c551e1e74a83c45a1c8ea1f2cf2253b5009e935120946703fed2d93c1cdb5825dcd0140d586152dc14b12e6950c6b32fba61033390d
data/locales/de.yml ADDED
@@ -0,0 +1,2 @@
1
+ de:
2
+ permission_error_no_action_rule: Keine %{action}-Regel für %{name}
data/locales/en.yml ADDED
@@ -0,0 +1,2 @@
1
+ en:
2
+ permission_error_no_action_rule: No %{action} rule for %{name}
@@ -2,7 +2,7 @@ def standardize_items
2
2
  super unless content == "_left"
3
3
  end
4
4
 
5
- def options_rule_card
5
+ def options_card
6
6
  Card[:cards_with_account]
7
7
  end
8
8
 
@@ -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
- fields.compact.each(&block)
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(Card.fetch_id(member.read_rule_class)) < rule_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
- pattern_ids.index(pattern_id) || invalid_pattern_id(pattern_id)
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.13.1
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-08-06 00:00:00.000000000 Z
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.103.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.103.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.1.6
74
+ rubygems_version: 3.2.15
73
75
  signing_key:
74
76
  specification_version: 4
75
77
  summary: decko permissions