diff --git a/db/migrate/20220524074118_issue4089_fix_draft_attribute.rb b/db/migrate/20220524074118_issue4089_fix_draft_attribute.rb new file mode 100644 index 000000000..bedc5fcc4 --- /dev/null +++ b/db/migrate/20220524074118_issue4089_fix_draft_attribute.rb @@ -0,0 +1,10 @@ +# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/ + +class Issue4089FixDraftAttribute < ActiveRecord::Migration[5.0] + def change + # return if it's a new setup + return if !Setting.exists?(name: 'system_init_done') + + ObjectManager::Attribute.find_by(name: 'shared_drafts', object_lookup_id: ObjectLookup.by_name('Group')).update(editable: false) + end +end diff --git a/db/seeds/object_manager_attributes.rb b/db/seeds/object_manager_attributes.rb index 6617c6718..7fb9c8f81 100644 --- a/db/seeds/object_manager_attributes.rb +++ b/db/seeds/object_manager_attributes.rb @@ -1824,7 +1824,7 @@ ObjectManager::Attribute.add( default: true, permission: ['admin.group'], }, - editable: true, + editable: false, active: true, screens: { create: {