function hosting_site_update_6203 in Hosting 7.3
Same name and namespace in other branches
- 6.2 site/hosting_site.install \hosting_site_update_6203()
- 7.4 site/hosting_site.install \hosting_site_update_6203()
Add new Action permissions.
File
- site/
hosting_site.install, line 380 - Define database schema and update functions for the hosting_site module.
Code
function hosting_site_update_6203() {
$ret = array();
// Enable Actions permissions, and temporarily Install Profile API
// module to load permission CRUD functions
module_enable(array(
'actions_permissions',
'install_profile_api',
));
module_load_include('inc', 'install_profile_api', 'core/user');
install_add_permissions(install_get_rid('aegir administrator'), array(
'execute Site: Backup (hosting_site_op_backup)',
'execute Site: Delete (hosting_site_op_delete)',
'execute Site: Disable (hosting_site_op_disable)',
'execute Site: Enable (hosting_site_op_enable)',
'execute Site: Reset password (hosting_site_op_login_reset)',
'execute Site: Verify (hosting_site_op_verify)',
));
install_add_permissions(install_get_rid('aegir platform manager'), array(
'execute Site: Delete (hosting_site_op_delete)',
'execute Site: Disable (hosting_site_op_disable)',
'execute Site: Enable (hosting_site_op_enable)',
'execute Site: Verify (hosting_site_op_verify)',
));
install_add_permissions(install_get_rid('aegir client'), array(
'execute Site: Backup (hosting_site_op_backup)',
'execute Site: Delete (hosting_site_op_delete)',
'execute Site: Disable (hosting_site_op_disable)',
'execute Site: Enable (hosting_site_op_enable)',
'execute Site: Reset password (hosting_site_op_login_reset)',
'execute Site: Verify (hosting_site_op_verify)',
));
module_disable(array(
'install_profile_api',
));
return $ret;
}