You are here

function hosting_platform_update_6207 in Hosting 6.2

Same name and namespace in other branches
  1. 7.4 platform/hosting_platform.install \hosting_platform_update_6207()
  2. 7.3 platform/hosting_platform.install \hosting_platform_update_6207()

Add new Action permissions.

File

platform/hosting_platform.install, line 186
Install, update and uninstall for the Platforms module.

Code

function hosting_platform_update_6207() {
  $ret = array();

  // Enable Acstions 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 Platform: Delete (hosting_platform_op_delete)',
    'execute Platform: Lock (hosting_platform_op_lock)',
    'execute Platform: Unlock (hosting_platform_op_unlock)',
    'execute Platform: Verify (hosting_platform_op_verify)',
  ));
  install_add_permissions(install_get_rid('aegir platform manager'), array(
    'execute Platform: Delete (hosting_platform_op_delete)',
    'execute Platform: Lock (hosting_platform_op_lock)',
    'execute Platform: Unlock (hosting_platform_op_unlock)',
    'execute Platform: Verify (hosting_platform_op_verify)',
  ));
  module_disable(array(
    'install_profile_api',
  ));
  return $ret;
}