mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-12-11 06:35:58 +08:00
Merge pull request #7849 from artoscinote/ma_SCI_10865
Fix shareable scope [SCI-10865]
This commit is contained in:
commit
eeee2f0d21
1 changed files with 11 additions and 13 deletions
|
|
@ -30,10 +30,8 @@ module Shareable
|
|||
readable = readable_by_user(user).left_outer_joins(:team_shared_objects)
|
||||
readable
|
||||
.where(team: teams)
|
||||
.or(readable.where(team_shared_objects: { team: teams }))
|
||||
.or(readable
|
||||
.where(
|
||||
if column_names.include?('permission_level')
|
||||
.or(where(team_shared_objects: { team: teams }))
|
||||
.or(where(if column_names.include?('permission_level')
|
||||
{
|
||||
permission_level: [
|
||||
Extends::SHARED_OBJECTS_PERMISSION_LEVELS[:shared_read],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue