You are here

function hosting_update_6204 in Hosting 7.4

Same name and namespace in other branches
  1. 6.2 hosting.install \hosting_update_6204()
  2. 7.3 hosting.install \hosting_update_6204()

Create new roles.

File

./hosting.install, line 489
Define database schemas and update functions for the hosting module.

Code

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

  // Temporarily enable Install Profile API module and load includes.
  module_enable(array(
    'install_profile_api',
  ));
  module_load_include('inc', 'install_profile_api', 'core/user');
  install_remove_permissions(install_get_rid('aegir client'), array(
    'access all views',
  ));
  install_add_role('aegir platform manager');
  install_add_permissions(install_get_rid('aegir platform manager'), array(
    'create clone task',
    'create migrate task',
    'create platform',
    'delete platform',
    'edit platform',
    'view locked platforms',
    'view platform',
    'create site',
    'delete site',
    'edit site',
    'view site',
    'access task logs',
    'create lock task',
    'create unlock task',
    'view revisions',
    'search content',
    'use advanced search',
  ));
  install_add_role('aegir administrator');
  install_add_permissions(install_get_rid('aegir administrator'), array(
    'access disabled sites',
    'access hosting wizard',
    'administer hosting',
    'administer hosting features',
    'administer hosting queues',
    'administer hosting settings',
    'administer hosting aliases',
    'create site aliases',
    'administer clients',
    'create client',
    'delete own client',
    'edit client uname',
    'edit client users',
    'edit own client',
    'view client',
    'create clone task',
    'create migrate task',
    'create package',
    'delete package',
    'edit package',
    'view package',
    'create platform',
    'delete platform',
    'edit platform',
    'view locked platforms',
    'view platform',
    'edit all quotas',
    'view all quotas',
    'view own quota',
    'create server',
    'delete server',
    'edit server',
    'view server',
    'access hosting signup form',
    'administer sites',
    'create site',
    'delete site',
    'edit site',
    'view site',
    'create ssl certificate',
    'access task logs',
    'administer tasks',
    'cancel own tasks',
    'create backup task',
    'create backup-delete task',
    'create delete task',
    'create disable task',
    'create enable task',
    'create lock task',
    'create login-reset task',
    'create restore task',
    'create unlock task',
    'create verify task',
    'retry failed tasks',
    'view own tasks',
    'view task',
  ));
  module_disable(array(
    'install_profile_api',
  ));
  return $ret;
}