mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-26 05:57:06 +08:00
Fix team sharing logic [SCI-11102]
This commit is contained in:
parent
00200823eb
commit
c7f175b71b
1 changed files with 2 additions and 0 deletions
|
|
@ -33,6 +33,8 @@ class TeamSharedObjectsController < ApplicationController
|
|||
|
||||
# Share to specific teams
|
||||
params[:team_share_params].each do |t|
|
||||
next unless t['private_shared_with']
|
||||
|
||||
@model.update!(permission_level: :not_shared) if @model.globally_shareable?
|
||||
|
||||
team_shared_object = @model.team_shared_objects.find_or_initialize_by(team_id: t['id'])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue