mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-09-11 07:34:41 +08:00
Update of sharing options to all teams is not saved [SCI-7421] (#4852)
* Update of sharing options to all teams is not saved
This commit is contained in:
parent
599ef71c90
commit
913cd26e70
1 changed files with 2 additions and 3 deletions
|
@ -259,11 +259,10 @@ class Repository < RepositoryBase
|
|||
|
||||
Team.where.not(id: team.id).find_each do |team|
|
||||
team.users.find_each do |user|
|
||||
team.repository_sharing_user_assignments.create!(
|
||||
team.repository_sharing_user_assignments.find_or_initialize_by(
|
||||
user: user,
|
||||
user_role: shared_write? ? normal_user_role : viewer_role,
|
||||
assignable: self
|
||||
)
|
||||
).update!(user_role: shared_write? ? normal_user_role : viewer_role)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue