mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 12:38:30 +08:00
Set default public user role for visible projects [SCI-7978]
This commit is contained in:
parent
c24b0fa5ab
commit
a43f70f8ba
1 changed files with 9 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class SetDefaultPublicUserRoleOnProtocols < ActiveRecord::Migration[6.1]
|
||||
def change
|
||||
Protocol.where(default_public_user_role_id: nil, visibility: :visible).update_all(
|
||||
default_public_user_role_id: UserRole.find_predefined_viewer_role.id
|
||||
)
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue