Wp-calypso: Marketing: Traffic: Show permission requirement notice for non-admin users

Created on 14 May 2019  路  6Comments  路  Source: Automattic/wp-calypso

Steps to reproduce

  • Visit a WordPress.com site as an admin (best use a WordPress.com Premium plan site)
  • Visit the Marketing tab on the left sidebar, which leads to https://wordpress.com/marketing/traffic/ (if the tab is not visible on the sidebar, visit directly)
  • Visit the same page with other user roles - editor, author and contributor.

What is expected

The page https://wordpress.com/marketing/traffic/ does not load the content for these user roles - editor, author and contributor

It should show a notice mentioning that required permissions are not available.

What happens instead

The page loads for these user roles - editor, author and contributor

But none of the actions on this page can be saved during to missing permissions. A notice that reads There was a problem saving your changes. Please try again. can be seen as well.

Additionally, another note There was an error retrieving purchases. appears every time the page is refreshed, without any action. That request shouldn't be happening.

Screenshot 2019-05-14 at 23 45 22

Notes

The permissions requirement notice should be something like this:

Screenshot 2019-05-14 at 23 12 47

The above screenshot was taken using the contributor role on one such path.

FixTheFlows Marketing [Impact] High

All 6 comments

This is still an issue. Details on #33210 (comment) and #33210 (review)

So all navigation paths related to Marketing should show 'unauthorized' message then?

https://wordpress.com/marketing/traffic/ in production now shows "unauthorized" message for Editor, Author, and Contributor roles.

screenshot_800

This leaves only removal of the call that results in unnecessary error popup.

Sorry, forgot about that in #34597: PR to fix in #34799

Also, whilst that PR addressed the Traffic page, I did notice when working on that PR that this is probably not appropriate to display for non-admins; the primary CTA leads to an unauthorized error, and so does "Upgrade to Business".

Screenshot 2019-07-20 at 19 24 30

@Aurorum Approved. This issue can be closed after #34799 is merged. Thx!

I had been away for a while and couldn't get to the pings here. Thanks for the patches, @Aurorum!

Was this page helpful?
0 / 5 - 0 ratings