mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Merge pull request #7886 from artoscinote/ma_SCI_11102
Fix team sharing logic [SCI-11102]
This commit is contained in:
commit
a4f5b3c724
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…
Reference in a new issue