Follow up - db3f553140 / 5f06c8c6b4 - Fixes #2866 #3215 - Added missing Channel permissions for G-Suite/Google Workspaces and Office365/Microsoft365.

This commit is contained in:
Rolf Schmidt 2020-10-28 10:52:30 +01:00 committed by Thorsten Eckel
parent e972d0be89
commit a07e587586
2 changed files with 37 additions and 0 deletions

View 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

View file

@ -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',