parent
3907c49263
commit
412333c25c
|
@ -1,3 +1,4 @@
|
||||||
|
3.1.0.beta3: 3907c4926383303ff85d992bb276e2b173cf0843
|
||||||
3.1.0.beta1: 0f6b30c2d84d44978be1c845267609446ca9dbf2
|
3.1.0.beta1: 0f6b30c2d84d44978be1c845267609446ca9dbf2
|
||||||
2.9.0.beta8: 729e5a2add46fb4e2d8ed092da05a87ebbfcf05b
|
2.9.0.beta8: 729e5a2add46fb4e2d8ed092da05a87ebbfcf05b
|
||||||
2.9.0.beta6: 272e9dd760f82e33f9756866434ddcbe470cdb8e
|
2.9.0.beta6: 272e9dd760f82e33f9756866434ddcbe470cdb8e
|
||||||
|
|
12
plugin.rb
12
plugin.rb
|
@ -64,13 +64,11 @@ after_initialize do
|
||||||
user_is_a_member_of_group?(group) && query.groups.exists?(id: group.id)
|
user_is_a_member_of_group?(group) && query.groups.exists?(id: group.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
add_to_serializer(:group_show, :has_visible_data_explorer_queries, false) do
|
add_to_serializer(
|
||||||
DiscourseDataExplorer::Query.for_group(object).exists?
|
:group_show,
|
||||||
end
|
:has_visible_data_explorer_queries,
|
||||||
|
include_condition: -> { scope.user_is_a_member_of_group?(object) },
|
||||||
add_to_serializer(:group_show, :include_has_visible_data_explorer_queries?, false) do
|
) { DiscourseDataExplorer::Query.for_group(object).exists? }
|
||||||
SiteSetting.data_explorer_enabled && scope.user_is_a_member_of_group?(object)
|
|
||||||
end
|
|
||||||
|
|
||||||
register_bookmarkable(DiscourseDataExplorer::QueryGroupBookmarkable)
|
register_bookmarkable(DiscourseDataExplorer::QueryGroupBookmarkable)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue