mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 04:34:06 +08:00
Fix shareable viewable scope [SCI-11100]
This commit is contained in:
parent
677b199bfa
commit
283b1e8175
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ module Shareable
|
|||
end
|
||||
|
||||
scope :viewable_by_user, lambda { |user, teams = user.current_team|
|
||||
readable_ids = readable_by_user(user).pluck(:id)
|
||||
readable_ids = readable_by_user(user).where(team: teams).pluck(:id)
|
||||
shared_with_team_ids = joins(:team_shared_objects, :team).where(team_shared_objects: { team: teams }).pluck(:id)
|
||||
globally_shared_ids =
|
||||
if column_names.include?('permission_level')
|
||||
|
|
Loading…
Reference in a new issue