Follow up - db3f553140
/ 5f06c8c6b4
- Fixes #2866 #3215 - Added missing Channel permissions for G-Suite/Google Workspaces and Office365/Microsoft365.
This commit is contained in:
parent
e972d0be89
commit
a07e587586
2 changed files with 37 additions and 0 deletions
23
db/migrate/20201027152258_add_missing_permissions.rb
Normal file
23
db/migrate/20201027152258_add_missing_permissions.rb
Normal file
|
@ -0,0 +1,23 @@
|
|||
class AddMissingPermissions < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
|
||||
# return if it's a new setup
|
||||
return if !Setting.exists?(name: 'system_init_done')
|
||||
|
||||
Permission.create_if_not_exists(
|
||||
name: 'admin.channel_google',
|
||||
note: 'Manage %s',
|
||||
preferences: {
|
||||
translations: ['Channel - Google']
|
||||
},
|
||||
)
|
||||
|
||||
Permission.create_if_not_exists(
|
||||
name: 'admin.channel_microsoft365',
|
||||
note: 'Manage %s',
|
||||
preferences: {
|
||||
translations: ['Channel - Microsoft 365']
|
||||
},
|
||||
)
|
||||
end
|
||||
end
|
|
@ -143,6 +143,20 @@ Permission.create_if_not_exists(
|
|||
translations: ['Channel - Telegram']
|
||||
},
|
||||
)
|
||||
Permission.create_if_not_exists(
|
||||
name: 'admin.channel_google',
|
||||
note: 'Manage %s',
|
||||
preferences: {
|
||||
translations: ['Channel - Google']
|
||||
},
|
||||
)
|
||||
Permission.create_if_not_exists(
|
||||
name: 'admin.channel_microsoft365',
|
||||
note: 'Manage %s',
|
||||
preferences: {
|
||||
translations: ['Channel - Microsoft 365']
|
||||
},
|
||||
)
|
||||
Permission.create_if_not_exists(
|
||||
name: 'admin.channel_sms',
|
||||
note: 'Manage %s',
|
||||
|
|
Loading…
Reference in a new issue