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.
Comment | File | Size | Author |
---|---|---|---|
#15 | 2810617-4x-reroll-15.patch | 1.18 KB | japerry |
#10 | acquia_connector-hide_toolbar_status_for_non_admin-2810617-10.patch | 718 bytes | wolffereast |
#6 | acquia_connector-hide_toolbar_status_for_non_admin-2810617.patch | 562 bytes | shelane |
acquia-403.png | 82.43 KB | notmike | |
acquia-connector.png | 60.54 KB | notmike |
Comments
Comment #2
anavarreComment #3
sassafrass CreditAttribution: sassafrass as a volunteer commentedI would also like to see this feature.
Comment #4
renaudcuny CreditAttribution: renaudcuny at OSCE: Organization for Security and Co-operation in Europe commentedDear 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
Comment #5
sdmeyers CreditAttribution: sdmeyers as a volunteer commentedRather 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 infunction acquia_connector_toolbar()
Comment #6
shelaneSince 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.
Comment #7
timwoodFYI, patch in #6 also currently applies cleanly to the 8.x-2.0-beta1 release.
Comment #8
Dane Powell CreditAttribution: Dane Powell at Acquia commentedSeems 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
Comment #9
japerryGenerally 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?
Comment #10
wolffereast CreditAttribution: wolffereast at OHO Interactive commentedSwapped 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
Comment #12
japerryComment #13
PCate CreditAttribution: PCate commentedWould 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.
Comment #14
capysara CreditAttribution: capysara at Bounteous commentedI 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.
Comment #15
japerryrerolled for connector 4.x
Comment #17
japerryThis is fixed in 4.0.0-beta3