I would like to surface a link to the Hostmaster site. In devshop we don't link to the "Sites" page so it's really a pain to find the hostmaster site.

I figured since this is where you do things like Enable HTTPS, we should make the hostmaster site more accessible.

The upcoming patch adds a MENU_NORMAL_ITEM for /hostmaster, which simply redirects to hosting/c/hostmaster.

I know it seems weird but it's drupal. This is the simplest cleanest way to do it.

I thought through the alternative, and it would be messier: Adding a URL alias for /hostmaster and a primary link to that node programmatically, on install and update, isn't good. As a friend at the DrupalNorth sprints said: "No State".

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jon Pugh created an issue. See original summary.

  • Jon Pugh committed 03b7dcb on 2992202-hostmaster-link
    Issue #2992202: Add a "Hostmaster" link to the primary links
    
Jon Pugh’s picture

FileSize
772 bytes
Jon Pugh’s picture

Issue tags: +DrupalNorth2018
helmo’s picture

This would at least need some access check to not show it to people that are lacking 'administer aegir' permissions.

And maybe add a 'weight' => 100, line to get to the end of the menu list.

Jon Pugh’s picture

Actually, i recommend using "drupal_valid_path" to check against "node/$nid".

This way all permissions are delegated to the node view page.

++On making it 100.

helmo’s picture

Status: Needs review » Needs work

  • Jon Pugh committed d1089ff on 2992202-hostmaster-link
    Issue #2992202 by Jon Pugh: Add a "Hostmaster" link to the primary links
    
Jon Pugh’s picture

Status: Needs work » Reviewed & tested by the community
helmo’s picture

Status: Reviewed & tested by the community » Needs work

Sorry, missing an access check

  • Jon Pugh committed d1a83ce on 2992202-hostmaster-link
    Issue #2992202 by Jon Pugh, helmo: Add a "Hostmaster" link to the...
Jon Pugh’s picture

FileSize
1.02 KB
Jon Pugh’s picture

Status: Needs work » Needs review

Sorry about that, I was thinking only of the urlpath, forgot visibility of the link.

Added drupal_valid_path() as it's the easiest way to check for access rights.

  • Jon Pugh committed 03b7dcb on 7.x-3.x
    Issue #2992202: Add a "Hostmaster" link to the primary links
    
  • Jon Pugh committed d1089ff on 7.x-3.x
    Issue #2992202 by Jon Pugh: Add a "Hostmaster" link to the primary links
    
  • Jon Pugh committed d1a83ce on 7.x-3.x
    Issue #2992202 by Jon Pugh, helmo: Add a "Hostmaster" link to the...

  • Jon Pugh committed 03b7dcb on 7.x-4.x
    Issue #2992202: Add a "Hostmaster" link to the primary links
    
  • Jon Pugh committed d1089ff on 7.x-4.x
    Issue #2992202 by Jon Pugh: Add a "Hostmaster" link to the primary links
    
  • Jon Pugh committed d1a83ce on 7.x-4.x
    Issue #2992202 by Jon Pugh, helmo: Add a "Hostmaster" link to the...

  • Jon Pugh committed b95f85f on 7.x-3.x
    Issue #2992202: Fix access check. I thought drupal_valid_path() also...
Jon Pugh’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.