2018-09-13 10:28:58 +00:00
|
|
|
class PermissionAddTimeAccounting < 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(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.time_accounting',
|
|
|
|
note: 'Manage %s',
|
2018-09-13 10:28:58 +00:00
|
|
|
preferences: {
|
|
|
|
translations: ['Time Accounting']
|
|
|
|
},
|
|
|
|
)
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|