function lingotek_post_update_lingotek_manage_lingotek_translations_permission in Lingotek Translation 8.2
Add the new 'manage lingotek translations' permission to roles already with 'administer lingotek' permission.
File
- ./
lingotek.post_update.php, line 20 - Post update functions for Lingotek.
Code
function lingotek_post_update_lingotek_manage_lingotek_translations_permission(&$sandbox) {
$roles = Role::loadMultiple();
foreach ($roles as $role) {
if ($role
->hasPermission('administer lingotek')) {
$role
->grantPermission('manage lingotek translations');
$role
->save();
}
}
}