Problem/Motivation

If an Authenticated User has permission to "Use the administration toolbar," that user can also see the Acquia subscription status info (along with the link to the Acquia Insight dashboard. This link to Acquia Insight is only relevant to our system administrators, and the subscription expiration date is only relevant to a small fraction of our system administrators. It is not relevant and potentially confusing to our site administrators, content managers, and content creators. Adding to the confusion, for most of our users, clicking the link would take that user to a 403 page on insight.acquia.com with no context to inform the user why they ended up there.

Proposed resolution

Add a permission configuration for the Acquia Connector module to only show the Acquia Insight link in the Administration toolbar for designated roles.

User interface changes

Perhaps, in addition, to the permission configuration, the link text could more clearly indicate the purpose/destination of the link (example, "Acquia Insight"), with the subscription status and expiration date moved to a less prominent location (either as a title attribute that displays as a tooltip on hover or on the Acquia Insight overview page, itself). As the very wide and prominent link appears now, it is not immediately clear what "subscription" the link text refers to.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

notmike created an issue. See original summary.

anavarre’s picture

Version: 8.x-1.5 » 8.x-1.x-dev
sassafrass’s picture

I would also like to see this feature.

renaudcuny’s picture

Dear notmike,

Ran in the same issue, and decided that this status message should simply be visible only for administrator role. Does not match 100% the solution you proposed, but I think creating a permission for something that is just a status info is a bit overkill.

Anyway, attaching my patch, if you like it, feel free to use it :). If you want to edit your issue so the patch matches and can be committed, please go ahead.

Best,
Renaud

sdmeyers’s picture

Rather than just hiding it for some. I would really like the option to hide it for everyone. Why not add an option in the /admin/config/system/acquia-connector form to hide/show in Admin Toolbar and then simple check the setting in function acquia_connector_toolbar()

function acquia_connector_toolbar() {
    if ($config->get('use_toolbar') {
        /* toolbar code */
    }
}
shelane’s picture

Since this patch was created a while ago, it doesn't apply against 8.x-1.16. This patch just updates the line numbers to the new location.

timwood’s picture

FYI, patch in #6 also currently applies cleanly to the 8.x-2.0-beta1 release.

Dane Powell’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Status: Active » Needs review

Seems like this needs review?

Also note that you could basically implement this on an individual project using alter hooks, as described in #2854346-3: Uses too much space in the toolbar

japerry’s picture

Generally speaking, its not a great idea to limit things via role from a module, instead use permissions. How about using 'administer site configuration' as the gate to seeing subscription status?

wolffereast’s picture

Swapped the hard coded role test out for a permission. Please let me know if there is a better place for the permission test.

Would this need an update hook to add the permission to existing roles for backwards compatibility? The current expected behavior is that every authenticated role sees the toolbar.

This appears to apply cleanly to both 1.x and 2.x

Status: Needs review » Needs work
japerry’s picture

Version: 8.x-2.x-dev » 3.x-dev
PCate’s picture

Would love to have this permission added as well. Several users of client have been very confused and worried about their subscription expiring, thinking if refers to something else.

capysara’s picture

I see that the test failed, but Patch #10 applied cleanly and works as expected. I'm using Drupal 9.3.0 and Acquia Connector 8.x-1.26.

Administrator role has permission enabled by default -- Insight link is visible.
Authenticated users have permission to Use the toolbar. Without the new permission, the Insight link is not visible. With the new permission, the link is visible.

I think you make a good point about backwards compatibility--this probably needs an update hook so that it continues to work as it has been. I know that I wouldn't miss it if it just disappeared one day, but someone else might wonder where it went.

japerry’s picture

Version: 3.x-dev » 4.x-dev
Status: Needs work » Needs review
FileSize
1.18 KB

rerolled for connector 4.x

  • japerry authored 79953b9 on 4.x
    DIT-664: Update SPI to local Profile Reports only. (#174)
    
    * Issue...
japerry’s picture

Version: 4.x-dev » 4.0.0-beta3
Status: Needs review » Fixed

This is fixed in 4.0.0-beta3

Status: Fixed » Closed (fixed)

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