mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 17:51:13 +08:00
Merge pull request #5043 from aignatov-bio/ai-sci-8019-fix-user-invitation
Fix protocol public assignments [SCI-8019]
This commit is contained in:
commit
7c51cba245
2 changed files with 4 additions and 4 deletions
|
@ -99,7 +99,7 @@ module AccessPermissions
|
|||
@protocol.assign_attributes(permitted_default_public_user_role_params)
|
||||
@protocol.save!
|
||||
|
||||
UserAssignments::ProjectGroupAssignmentJob.perform_later(current_team, @project, current_user)
|
||||
UserAssignments::ProtocolGroupAssignmentJob.perform_later(current_team, @protocol, current_user)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -38,9 +38,9 @@ class Team < ApplicationRecord
|
|||
has_many :protocols, inverse_of: :team, dependent: :destroy
|
||||
has_many :repository_protocols,
|
||||
(lambda do
|
||||
where(protocol_type: [Protocol.protocol_types[:in_repository_public],
|
||||
Protocol.protocol_types[:in_repository_private],
|
||||
Protocol.protocol_types[:in_repository_archived]])
|
||||
where(protocol_type: %i(in_repository_published_original
|
||||
in_repository_draft
|
||||
in_repository_published_version))
|
||||
end),
|
||||
class_name: 'Protocol'
|
||||
has_many :protocol_keywords, inverse_of: :team, dependent: :destroy
|
||||
|
|
Loading…
Reference in a new issue