Fixed issue #1699 - No user preference for out-of-office available.

This commit is contained in:
Martin Edenhofer 2017-12-07 16:42:39 +01:00
parent 5da4d8f466
commit b42b7cf6ee
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,18 @@
class PermissionUserPreferencesOutOfOffice < ActiveRecord::Migration[5.1]
def up
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
Permission.create_if_not_exists(
name: 'user_preferences.out_of_office',
note: 'Change %s',
preferences: {
translations: ['Out of Office'],
required: ['ticket.agent'],
},
)
end
end

View file

@ -283,6 +283,14 @@ Permission.create_if_not_exists(
required: ['ticket.agent'],
},
)
Permission.create_if_not_exists(
name: 'user_preferences.out_of_office',
note: 'Change %s',
preferences: {
translations: ['Out of Office'],
required: ['ticket.agent'],
},
)
Permission.create_if_not_exists(
name: 'report',