Merge pull request #7886 from artoscinote/ma_SCI_11102

Fix team sharing logic [SCI-11102]
This commit is contained in:
Martin Artnik 2024-09-25 14:30:53 +02:00 committed by GitHub
commit a4f5b3c724
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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'])