klastera 1.1.1 → 1.1.2
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: a198ff3af2a7b61a6a111ba1531bb1e5075cd7ff32a74a6db06b0b27a9a450cb
|
4
|
+
data.tar.gz: 4b7548d0a282a24f72bb96ddd51b9339240f1752d9ca3b9be6d84682546c00ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a37bd5892c61181db82859cbb32aa0801e4521b2a5a56cb2f561462b675ae2152916208fc786cee8e18c4141755982a0004cde10751303d5b9bdd41bc632a76a
|
7
|
+
data.tar.gz: cf022a0d10ab1903c527c22efa485993e58f18dee5f1f98cd285a86132baecb6006459659c1c6b3446678dbcbf7bc866a492114daf04423699fcf18f130f2649
|
data/lib/klastera/version.rb
CHANGED
data/lib/klastera.rb
CHANGED
@@ -38,9 +38,10 @@ module Klastera
|
|
38
38
|
def session_clusters(user,organization)
|
39
39
|
clusters = []
|
40
40
|
if organization.is_in_cluster_mode?
|
41
|
-
unless user.can_admin_clusters?
|
42
|
-
# TODO: return a Cluster::ActiveRecord_Relation and then remove to_a in ::Cluster.of line
|
43
|
-
|
41
|
+
unless user.can_admin_clusters? || organization.optional_mode?
|
42
|
+
# TODO: 1: return a Cluster::ActiveRecord_Relation and then remove to_a in ::Cluster.of line
|
43
|
+
# TODO: 2: fix call to ::Cluster instead of Klastera::Cluster
|
44
|
+
clusters = ::ClusterUser.of(user,organization).map{|cu|::Cluster.find(cu.cluster_id)}
|
44
45
|
else
|
45
46
|
# TODO: remove "to_a" after ClusterUser.of result became a Cluster::ActiveRecord_Relation object
|
46
47
|
clusters = ::Cluster.of(organization).to_a
|