Methods
- R
Instance Public methods
resolve()
Link
We allow other users in the org to view the user
Source: show
# File rhino/rhino/app/policies/rhino/user_policy.rb 7 def resolve # rubocop:disable Metrics/AbcSize 8 return scope.none unless auth_owner 9 10 base_owner_pk = "#{Rhino.base_owner.table_name}.#{Rhino.base_owner.primary_key}" 11 12 # Base owners for the user 13 base_owners = scope.joins(scope.joins_for_base_owner).where(id: auth_owner.id).pluck(base_owner_pk) 14 15 # Users related to the base owners 16 scope.joins(scope.joins_for_base_owner).where(base_owner_pk => base_owners).distinct 17 end