effective_memberships 0.3.11 → 0.3.12
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 32668e9dd393f60b922e5133dccf0204b0506f6a6fcff74f955be98e417b9398
|
|
4
|
+
data.tar.gz: 9b15d17b3e60142c3db939e1ecedd92a028540fb20234443a2c46be8e7427dea
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b91b4b36706dce52f0fb43962a87977163364adcc0fb453d494f1e05895bf9e8edc737cf8a10df51d6cf5cf8da415957f0239ae1ef57de5425471bb68dc35e04
|
|
7
|
+
data.tar.gz: 14f41d1145244e763dab621c0db7cbfbea2e0ee2a5ad88eceaf953da5634a19ba562e44aff38557561a5ed60a6aee6d758b1c980180652fbba9d673f4b56241e
|
|
@@ -56,7 +56,9 @@ module EffectiveMembershipsOwner
|
|
|
56
56
|
owners = organizations if self.class.respond_to?(:effective_organizations_user?)
|
|
57
57
|
owners = users if self.class.respond_to?(:effective_organizations_organization?)
|
|
58
58
|
|
|
59
|
-
owners = Array(owners)
|
|
59
|
+
owners = Array(owners)
|
|
60
|
+
.select { |owner| owner.class.respond_to?(:effective_memberships_owner?) }
|
|
61
|
+
.reject { |owner| owner.try(:archived?) }
|
|
60
62
|
|
|
61
63
|
owners.presence || [self]
|
|
62
64
|
end
|
|
@@ -73,7 +75,11 @@ module EffectiveMembershipsOwner
|
|
|
73
75
|
|
|
74
76
|
def organization_membership_present?(except: nil)
|
|
75
77
|
return false unless self.class.respond_to?(:effective_organizations_user?)
|
|
76
|
-
|
|
78
|
+
|
|
79
|
+
organizations
|
|
80
|
+
.select { |organization| organization.class.respond_to?(:effective_memberships_owner?) }
|
|
81
|
+
.reject { |organization| organization.try(:archived?) }
|
|
82
|
+
.any? { |organization| organization != except && organization.membership_present? }
|
|
77
83
|
end
|
|
78
84
|
|
|
79
85
|
def assign_member_role
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: effective_memberships
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.12
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Code and Effect
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-02
|
|
11
|
+
date: 2022-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|