X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6fe152024269d838e31bc224adbd518c43cbfee5..fdc23914e8c3934e2c44643a48134485674ec312:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 374c6720f6..1c842c48d6 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -384,6 +384,14 @@ class ArvadosModel < ApplicationRecord direct_check = " OR " + direct_check end + if Rails.configuration.Users.RoleGroupsVisibleToAll && + sql_table == "groups" && + users_list.select { |u| u.is_active }.any? + # All role groups are readable (but we still need the other + # direct_check clauses to handle non-role groups). + direct_check += " OR #{sql_table}.group_class = 'role'" + end + links_cond = "" if sql_table == "links" # 1) Match permission links incoming or outgoing on the