20180913000002_permission_add_time_accounting.rb 369 B

1234567891011121314151617
  1. class PermissionAddTimeAccounting < ActiveRecord::Migration[5.1]
  2. def up
  3. # return if it's a new setup
  4. return if !Setting.find_by(name: 'system_init_done')
  5. Permission.create_if_not_exists(
  6. name: 'admin.time_accounting',
  7. note: 'Manage %s',
  8. preferences: {
  9. translations: ['Time Accounting']
  10. },
  11. )
  12. end
  13. end