mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-01-28 02:27:57 +08:00
Improve user team invitation logic [SCI-7577]
This commit is contained in:
parent
ff6471ce14
commit
89258ce2ae
2 changed files with 3 additions and 1 deletions
|
@ -99,7 +99,7 @@ module Users
|
|||
result[:status] = :user_exists_and_in_team
|
||||
else
|
||||
# Also generate user team relation
|
||||
team.user_assignments.create(user: user, user_role: @user_role, assigned_by: current_user)
|
||||
team.user_assignments.create!(user: user, user_role: @user_role, assigned_by: current_user)
|
||||
|
||||
generate_notification(
|
||||
@user,
|
||||
|
|
|
@ -35,6 +35,8 @@ module UserAssignments
|
|||
end
|
||||
|
||||
@team.team_shared_repositories.find_each do |team_shared_repository|
|
||||
next if team_shared_repository.shared_object.blank?
|
||||
|
||||
@team.repository_sharing_user_assignments.create!(
|
||||
user: @user,
|
||||
user_role: @user_role,
|
||||
|
|
Loading…
Reference in a new issue