2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Admin Interface'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.user',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Users')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.group',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Groups')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.role',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Roles')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.organization',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Organizations')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.overview',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Overviews')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.text_module',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Text Modules')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
2018-09-13 10:28:58 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.time_accounting',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2018-09-13 10:28:58 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Time Accounting')]
|
2018-09-13 10:28:58 +00:00
|
|
|
},
|
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.macro',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Macros')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.tag',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Tags')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.calendar',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Calendar')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.sla',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('SLA')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
2019-10-29 10:41:12 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.trigger',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2019-10-29 10:41:12 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Triggers')]
|
2019-10-29 10:41:12 +00:00
|
|
|
},
|
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.scheduler',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Scheduler')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.report_profile',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Report Profiles')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_web',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Web')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_formular',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Formular')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_email',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Email')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_twitter',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Twitter')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_facebook',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Facebook')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_telegram',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Telegram')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
2020-10-28 09:52:30 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.channel_google',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-28 09:52:30 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Google')]
|
2020-10-28 09:52:30 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.channel_microsoft365',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-28 09:52:30 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Microsoft 365')]
|
2020-10-28 09:52:30 +00:00
|
|
|
},
|
|
|
|
)
|
2018-10-16 08:45:15 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_sms',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2018-10-16 08:45:15 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - SMS')]
|
2018-10-16 08:45:15 +00:00
|
|
|
},
|
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.channel_chat',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Channel - Chat')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.branding',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Branding')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.setting_system',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s Settings'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('System')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.security',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s Settings'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Security')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.ticket',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s Settings'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Ticket')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.package',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Packages')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.integration',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Integrations')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.api',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('API')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.object',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Objects')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.translation',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Translations')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.monitoring',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Monitoring')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
2020-09-08 15:06:23 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.data_privacy',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-09-08 15:06:23 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Data Privacy')]
|
2020-09-08 15:06:23 +00:00
|
|
|
},
|
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.maintenance',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Maintenance')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'admin.session',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Sessions')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
2021-02-23 14:52:16 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.webhook',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2021-02-23 14:52:16 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Webhooks')]
|
2021-02-23 14:52:16 +00:00
|
|
|
},
|
|
|
|
)
|
2021-09-10 09:23:50 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.core_workflow',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2021-09-10 09:23:50 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Core Workflow')]
|
2021-09-10 09:23:50 +00:00
|
|
|
},
|
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('User Preferences'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {},
|
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.password',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Change %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Password')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.notifications',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Notifications')],
|
2018-12-19 17:31:51 +00:00
|
|
|
required: ['ticket.agent'],
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.access_token',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Token Access')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.language',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Change %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Language')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.linked_accounts',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Linked Accounts')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.device',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Devices')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.avatar',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Avatar')]
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.calendar',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Calendars')],
|
2018-12-19 17:31:51 +00:00
|
|
|
required: ['ticket.agent'],
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
2017-12-07 15:42:39 +00:00
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'user_preferences.out_of_office',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Change %s'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Out of Office')],
|
2018-12-19 17:31:51 +00:00
|
|
|
required: ['ticket.agent'],
|
2017-12-07 15:42:39 +00:00
|
|
|
},
|
2020-10-07 12:05:07 +00:00
|
|
|
allow_signup: true,
|
2017-12-07 15:42:39 +00:00
|
|
|
)
|
2017-04-26 11:28:32 +00:00
|
|
|
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'report',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Report Interface'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'ticket',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Ticket Interface'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
|
|
|
disabled: true
|
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'ticket.agent',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to Agent Tickets based on Group Access'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
|
|
|
plugin: ['groups']
|
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2020-10-07 12:05:07 +00:00
|
|
|
name: 'ticket.customer',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to Customer Tickets based on current_user and organization'),
|
2020-10-07 12:05:07 +00:00
|
|
|
preferences: {},
|
|
|
|
allow_signup: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'chat',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Chat')],
|
2020-10-07 07:04:48 +00:00
|
|
|
disabled: true,
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'chat.agent',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Chat')],
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'cti',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('CTI'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
|
|
|
disabled: true
|
|
|
|
},
|
|
|
|
)
|
|
|
|
Permission.create_if_not_exists(
|
2018-12-19 17:31:51 +00:00
|
|
|
name: 'cti.agent',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Access to %s'),
|
2017-04-26 11:28:32 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('CTI')],
|
2017-04-26 11:28:32 +00:00
|
|
|
},
|
|
|
|
)
|
|
|
|
|
2019-06-04 03:40:48 +00:00
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'admin.knowledge_base',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Create and setup %s'),
|
2019-06-04 03:40:48 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Knowledge Base')]
|
2019-06-04 03:40:48 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'knowledge_base',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2019-06-04 03:40:48 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Knowledge Base')],
|
2019-06-04 03:40:48 +00:00
|
|
|
disabled: true,
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'knowledge_base.editor',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2019-06-04 03:40:48 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Knowledge Base Editor')]
|
2019-06-04 03:40:48 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
|
|
|
Permission.create_if_not_exists(
|
|
|
|
name: 'knowledge_base.reader',
|
2021-11-15 15:58:19 +00:00
|
|
|
note: __('Manage %s'),
|
2019-06-04 03:40:48 +00:00
|
|
|
preferences: {
|
2021-11-15 15:58:19 +00:00
|
|
|
translations: [__('Knowledge Base Reader')]
|
2019-06-04 03:40:48 +00:00
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2017-04-26 11:28:32 +00:00
|
|
|
admin = Role.find_by(name: 'Admin')
|
|
|
|
admin.permission_grant('user_preferences')
|
|
|
|
admin.permission_grant('admin')
|
|
|
|
admin.permission_grant('report')
|
2019-06-04 03:40:48 +00:00
|
|
|
admin.permission_grant('knowledge_base.editor')
|
2017-04-26 11:28:32 +00:00
|
|
|
|
|
|
|
agent = Role.find_by(name: 'Agent')
|
|
|
|
agent.permission_grant('user_preferences')
|
|
|
|
agent.permission_grant('ticket.agent')
|
|
|
|
agent.permission_grant('chat.agent')
|
|
|
|
agent.permission_grant('cti.agent')
|
2019-06-04 03:40:48 +00:00
|
|
|
agent.permission_grant('knowledge_base.reader')
|
2017-04-26 11:28:32 +00:00
|
|
|
|
|
|
|
customer = Role.find_by(name: 'Customer')
|
|
|
|
customer.permission_grant('user_preferences.password')
|
|
|
|
customer.permission_grant('user_preferences.language')
|
|
|
|
customer.permission_grant('user_preferences.linked_accounts')
|
|
|
|
customer.permission_grant('user_preferences.avatar')
|
|
|
|
customer.permission_grant('ticket.customer')
|