You are here

function hostmaster_profile_final in Hostmaster (Aegir) 5.x

Perform any final installation tasks for this profile.

Return value

An optional HTML string to display to the user on the final installation screen.

File

./hostmaster.profile, line 282

Code

function hostmaster_profile_final() {

  // add default blocks
  hostmaster_install_add_block('hosting', 'hosting_summary', 'garland', 1, 10, 'left');
  hostmaster_install_add_block('hosting', 'hosting_queues', 'garland', 1, 0, 'right');
  hostmaster_install_add_block('hosting', 'hosting_queues_summary', 'garland', 1, 2, 'right');

  // enable the eldir theme, if present
  hostmaster_setup_theme('eldir');

  // Enable optional, yet recommended modules.
  hostmaster_setup_optional_modules();

  // @todo create proper roles, and set up views to be role based
  hostmaster_install_set_permissions(hostmaster_install_get_rid('anonymous user'), array(
    'access content',
    'access all views',
  ));
  hostmaster_install_set_permissions(hostmaster_install_get_rid('authenticated user'), array(
    'access content',
    'access all views',
  ));
  hostmaster_install_create_role('aegir client');

  // @todo we may need to have a hook here to consider plugins
  hostmaster_install_set_permissions(hostmaster_install_get_rid('aegir client'), array(
    'access content',
    'access all views',
    'edit own client',
    'view client',
    'create site',
    'delete site',
    'view site',
    'create backup task',
    'create delete task',
    'create disable task',
    'create enable task',
    'create restore task',
    'view own tasks',
    'view task',
  ));
  hostmaster_install_create_role('aegir account manager');
  hostmaster_install_set_permissions(hostmaster_install_get_rid('aegir account manager'), array(
    'create client',
    'edit client users',
    'view client',
  ));
  menu_rebuild();
  node_access_rebuild();
  drupal_goto('hosting/wizard');
}