Fixed issue #1699 - No user preference for out-of-office available.
This commit is contained in:
parent
5da4d8f466
commit
b42b7cf6ee
2 changed files with 26 additions and 0 deletions
|
@ -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
|
|
@ -283,6 +283,14 @@ Permission.create_if_not_exists(
|
||||||
required: ['ticket.agent'],
|
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(
|
Permission.create_if_not_exists(
|
||||||
name: 'report',
|
name: 'report',
|
||||||
|
|
Loading…
Reference in a new issue