Project

General

Profile

Initial and default settings for a plugin

Added by Anonymous over 6 years ago

Hello,

me is trying to have default settings for a plugin like this:

Redmine::Plugin.register :redmine_openid_connect do
  settings :default => {
    :enabled => true,
    :client_id => 'redmine',
    :openid_connect_server_url => 'https://myserver/.../',
    :client_secret => 'aSecret',
    :group => 'Users',
    :admin_group => 'Admins',
    :dynamic_config_expiry => 86400,
    :disable_ssl_validation => false,
  }, partial: 'settings/redmine_openid_connect_settings'
end

Those settings are shown the first time I go to the settings page of the plugin. As soon as I try to edit and apply those settings, they are basically disappearing and all values are blank.

What am I doing wrong? Any help is greatly appreciated.

the whole plugin can be seen at https://github.com/devopskube/redmine_git_remote, but with an empty default set. The one I am using is basically copied over for my internal usage only.


Replies (1)

RE: Initial and default settings for a plugin - Added by Anonymous over 6 years ago

This was fixed by using strings instead of references in the settings partial page.

    (1-1/1)