"Fossies" - the Fresh Open Source Software Archive

Member "db/migrate/20170629000001_exchange_integration.rb" (25 Mar 2021, 1343 Bytes) of package /linux/www/zammad-4.0.0.tar.bz2:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ruby source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the last Fossies "Diffs" side-by-side code changes report for "20170629000001_exchange_integration.rb": 3.4.1_vs_3.5.0.

    1 class ExchangeIntegration < ActiveRecord::Migration[4.2]
    2   def up
    3 
    4     # return if it's a new setup
    5     return if !Setting.exists?(name: 'system_init_done')
    6 
    7     Setting.set('import_backends', ['Import::Ldap', 'Import::Exchange'])
    8 
    9     Setting.create_if_not_exists(
   10       title:       'Exchange config',
   11       name:        'exchange_config',
   12       area:        'Integration::Exchange',
   13       description: 'Defines the Exchange config.',
   14       options:     {},
   15       state:       {},
   16       preferences: {
   17         prio:       2,
   18         permission: ['admin.integration'],
   19       },
   20       frontend:    false,
   21     )
   22     Setting.create_if_not_exists(
   23       title:       'Exchange integration',
   24       name:        'exchange_integration',
   25       area:        'Integration::Switch',
   26       description: 'Defines if Exchange is enabled or not.',
   27       options:     {
   28         form: [
   29           {
   30             display: '',
   31             null:    true,
   32             name:    'exchange_integration',
   33             tag:     'boolean',
   34             options: {
   35               true  => 'yes',
   36               false => 'no',
   37             },
   38           },
   39         ],
   40       },
   41       state:       false,
   42       preferences: {
   43         prio:           1,
   44         authentication: true,
   45         permission:     ['admin.integration'],
   46       },
   47       frontend:    true
   48     )
   49   end
   50 
   51 end