Fix settings, which should support fallback with redmine_plugin_kit

This commit is contained in:
Alexander Meindl
2021-12-08 16:47:56 +01:00
parent 6bbc235732
commit 077bdc6018
4 changed files with 33 additions and 27 deletions

View File

@@ -1,6 +1,11 @@
Changelog
=========
1.0.12
------
- Fixed settings bug introducted with version 1.0.11
1.0.11
------

26
config/settings.yml Normal file
View File

@@ -0,0 +1,26 @@
---
messenger_url: ''
messenger_icon: 'https://raw.githubusercontent.com/alphanodes/redmine_messenger/master/assets/images/icon.png'
messenger_channel: 'redmine'
messenger_username: 'robot'
messenger_verify_ssl: 1
messenger_direct_users_messages: 0
auto_mentions: 0
default_mentions: ''
display_watchers: 0
post_updates: 1
new_include_description: 1
updated_include_description: 1
post_private_contacts: 0
post_private_db: 0
post_private_issues: 0
post_private_notes: 0
post_wiki: 0
post_wiki_updates: 0
post_db: 0
post_db_updates: 0
post_contact: 0
post_contact_updates: 0
post_password: 0
post_password_updates: 0

27
init.rb
View File

@@ -14,32 +14,7 @@ Redmine::Plugin.register :redmine_messenger do
permission :manage_messenger, projects: :settings, messenger_settings: :update
settings default: {
messenger_url: '',
messenger_icon: 'https://raw.githubusercontent.com/alphanodes/redmine_messenger/master/assets/images/icon.png',
messenger_channel: 'redmine',
messenger_username: 'robot',
messenger_verify_ssl: '1',
messenger_direct_users_messages: '0',
auto_mentions: '0',
default_mentions: '',
display_watchers: '0',
post_updates: '1',
new_include_description: '1',
updated_include_description: '1',
post_private_contacts: '0',
post_private_db: '0',
post_private_issues: '0',
post_private_notes: '0',
post_wiki: '0',
post_wiki_updates: '0',
post_db: '0',
post_db_updates: '0',
post_contact: '0',
post_contact_updates: '0',
post_password: '0',
post_password_updates: '0'
}, partial: 'settings/messenger_settings'
settings default: loader.default_settings, partial: 'settings/messenger_settings'
end
RedminePluginKit::Loader.persisting { loader.load_model_hooks! }

View File

@@ -1,7 +1,7 @@
# frozen_string_literal: true
module RedmineMessenger
VERSION = '1.0.11'
VERSION = '1.0.12'
REDMINE_CONTACTS_SUPPORT = Redmine::Plugin.installed? 'redmine_contacts'
REDMINE_DB_SUPPORT = Redmine::Plugin.installed? 'redmine_db'