klastera 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/layouts/klastera/_nested_cluster_entity.html.erb +1 -1
- data/lib/klastera.rb +3 -3
- data/lib/klastera/version.rb +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f1d1b4ee48b85521c4f7b9b085877a8138ac3f267b275cd09974102d1c55e488
|
4
|
+
data.tar.gz: ff0bd6762b86cc3aa0bcf0f97302322175f2dca25797f7f4a413cd8b0a32f01c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3c25e15d17ce5a8f3a3ac621efff40ee0056794dea067c5db85b19b2ecca87badae22632f0d2358ddff397bcabdd1e0f1fe54a1795f9f6fc0a1806fc9a6d88d
|
7
|
+
data.tar.gz: b0f03f444cc382dea3f8988e015eb88635b4b707344896a2f07063b0d1a996d5f939c37fed19a08bb3b9a4eee3c6e3a2aeb3b7ad75e264c156d795fc3845d03a
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<% if cluster_organization.is_in_cluster_mode? %>
|
1
|
+
<% if cluster_organization.is_in_cluster_mode? && cluster_user.can_admin_clusters? %>
|
2
2
|
<div class="col-xs-12">
|
3
3
|
<% if hide_title||=false %>
|
4
4
|
<div class="form-group file required <%=f.object.class.name.parameterize%>_cluster_entity<%=' has-error' if f.object.errors.has_key?(:cluster_entities)%>">
|
data/lib/klastera.rb
CHANGED
@@ -103,12 +103,12 @@ module Klastera
|
|
103
103
|
if organization.required_suborganization_mode?
|
104
104
|
scope_klass = scope_klass.joins(:cluster_entities).where( cluster_entities: { cluster_id: cluster_ids } )
|
105
105
|
else
|
106
|
+
or_these_cluster_ids = cluster_ids.present? ? " OR cluster_entities.cluster_id IN (#{cluster_ids.join(",")})" : ""
|
106
107
|
scope_klass = scope_klass.joins("
|
107
108
|
LEFT OUTER JOIN cluster_entities
|
108
|
-
ON
|
109
|
-
AND entity_id = #{scope.table_name}.id
|
109
|
+
ON entity_id = #{scope.table_name}.id
|
110
110
|
AND entity_type = '#{scope}'
|
111
|
-
")
|
111
|
+
").where("cluster_entities.id IS NULL#{or_these_cluster_ids}")
|
112
112
|
end
|
113
113
|
# Provisional fix to avoid SQL clashes due to DISTINCT ON clause
|
114
114
|
scope_klass = scope_class(scope).where(organization_id: organization).where(id: scope_klass.map(&:id))
|
data/lib/klastera/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module Klastera
|
2
|
-
VERSION = "1.2.
|
3
|
-
end
|
2
|
+
VERSION = "1.2.3"
|
3
|
+
end
|