card-mod-account 0.11.4 → 0.11.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/set/all/account.rb +9 -2
- data/set/right/account/events.rb +1 -1
- data/set/right/email.rb +1 -0
- data/set/right/password.rb +1 -0
- data/set/right/roles.rb +2 -2
- data/set/type/signup/views.rb +5 -0
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b9d1ba94c41d615071e2d65c85e31a7144e1238653b90a22630c4690a62eb0a
|
4
|
+
data.tar.gz: f992ea401a0f60f061bf8dfee1c6857f141819ce8c26dc25ebd9ce90950be4d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11b3de8aea618723fd95440d0957c8c206f016a7b3ebc63a9271c4955096eb02d4803303f6b461a26a8b8d8287470c82a680b7495d010b31f7379f9ee06c091d
|
7
|
+
data.tar.gz: 3b1c09772530fcd400a40c1104afe149adbaebd502780637cb478f9903e658993d03f8c12c01feed984c1ceb5f8cc2550f35e8d45acaa76b033f57d1a09bfa52
|
data/set/all/account.rb
CHANGED
@@ -39,6 +39,7 @@ def fetch_read_rules
|
|
39
39
|
|
40
40
|
([AnyoneID] + parties).each_with_object([]) do |party_id, rule_ids|
|
41
41
|
next unless (cache = Card::Rule.read_rule_cache[party_id])
|
42
|
+
|
42
43
|
rule_ids.concat cache
|
43
44
|
end
|
44
45
|
end
|
@@ -48,10 +49,16 @@ def clear_roles
|
|
48
49
|
end
|
49
50
|
|
50
51
|
def with_clear_roles
|
51
|
-
a
|
52
|
+
a = @parties
|
53
|
+
b = @all_roles
|
54
|
+
c = @all_active_roles
|
55
|
+
d = @read_rules
|
52
56
|
yield
|
53
57
|
ensure
|
54
|
-
@parties
|
58
|
+
@parties = a
|
59
|
+
@all_roles = b
|
60
|
+
@all_active_roles = c
|
61
|
+
@read_rules = d
|
55
62
|
end
|
56
63
|
|
57
64
|
def all_enabled_roles
|
data/set/right/account/events.rb
CHANGED
@@ -44,7 +44,7 @@ def activatable
|
|
44
44
|
yield
|
45
45
|
end
|
46
46
|
|
47
|
-
#
|
47
|
+
# NOTE: this only works in the context of an action.
|
48
48
|
# if run independently, it will not activate an account
|
49
49
|
event :activate_account do
|
50
50
|
add_subfield :status, content: "active"
|
data/set/right/email.rb
CHANGED
data/set/right/password.rb
CHANGED
data/set/right/roles.rb
CHANGED
@@ -9,8 +9,8 @@ end
|
|
9
9
|
def forbidden_roles
|
10
10
|
# restore old roles for permission check
|
11
11
|
with_old_role_permissions do |new_roles|
|
12
|
-
new_roles.
|
13
|
-
|
12
|
+
new_roles.reject do |card|
|
13
|
+
Card.fetch(card, "*members").ok? :update
|
14
14
|
end
|
15
15
|
end
|
16
16
|
end
|
data/set/type/signup/views.rb
CHANGED
@@ -20,6 +20,7 @@ format :html do
|
|
20
20
|
|
21
21
|
def invite_button
|
22
22
|
return unless invitation?
|
23
|
+
|
23
24
|
button_tag "Send Invitation", situation: "primary"
|
24
25
|
end
|
25
26
|
|
@@ -57,12 +58,14 @@ format :html do
|
|
57
58
|
def verification_sent_line
|
58
59
|
account = card.account
|
59
60
|
return unless account.email_card.ok?(:read)
|
61
|
+
|
60
62
|
"A verification email has been sent to #{account.email}"
|
61
63
|
end
|
62
64
|
|
63
65
|
def verification_link_line
|
64
66
|
links = verification_links
|
65
67
|
return if links.empty?
|
68
|
+
|
66
69
|
links.join " "
|
67
70
|
end
|
68
71
|
|
@@ -81,6 +84,7 @@ format :html do
|
|
81
84
|
|
82
85
|
def approval_link text, with_or_without
|
83
86
|
return unless card.can_approve?
|
87
|
+
|
84
88
|
link_to_card card, text,
|
85
89
|
path: { action: :update,
|
86
90
|
card: { trigger: "approve_#{with_or_without}_verification" } }
|
@@ -88,6 +92,7 @@ format :html do
|
|
88
92
|
|
89
93
|
def deny_link
|
90
94
|
return unless card.ok? :delete
|
95
|
+
|
91
96
|
link_to_card card, "Deny and delete", path: { action: :delete }
|
92
97
|
end
|
93
98
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: card-mod-account
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.5
|
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-05-
|
13
|
+
date: 2021-05-10 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: card
|
@@ -18,56 +18,56 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - '='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.101.
|
21
|
+
version: 1.101.5
|
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.101.
|
28
|
+
version: 1.101.5
|
29
29
|
- !ruby/object:Gem::Dependency
|
30
30
|
name: card-mod-email
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
32
32
|
requirements:
|
33
33
|
- - '='
|
34
34
|
- !ruby/object:Gem::Version
|
35
|
-
version: 0.11.
|
35
|
+
version: 0.11.5
|
36
36
|
type: :runtime
|
37
37
|
prerelease: false
|
38
38
|
version_requirements: !ruby/object:Gem::Requirement
|
39
39
|
requirements:
|
40
40
|
- - '='
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: 0.11.
|
42
|
+
version: 0.11.5
|
43
43
|
- !ruby/object:Gem::Dependency
|
44
44
|
name: card-mod-permissions
|
45
45
|
requirement: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - '='
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version: 0.11.
|
49
|
+
version: 0.11.5
|
50
50
|
type: :runtime
|
51
51
|
prerelease: false
|
52
52
|
version_requirements: !ruby/object:Gem::Requirement
|
53
53
|
requirements:
|
54
54
|
- - '='
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 0.11.
|
56
|
+
version: 0.11.5
|
57
57
|
- !ruby/object:Gem::Dependency
|
58
58
|
name: card-mod-list
|
59
59
|
requirement: !ruby/object:Gem::Requirement
|
60
60
|
requirements:
|
61
61
|
- - '='
|
62
62
|
- !ruby/object:Gem::Version
|
63
|
-
version: 0.11.
|
63
|
+
version: 0.11.5
|
64
64
|
type: :runtime
|
65
65
|
prerelease: false
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
67
67
|
requirements:
|
68
68
|
- - '='
|
69
69
|
- !ruby/object:Gem::Version
|
70
|
-
version: 0.11.
|
70
|
+
version: 0.11.5
|
71
71
|
description: ''
|
72
72
|
email:
|
73
73
|
- info@decko.org
|