Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Super admin navigation showing for regular enterprises #8546

Closed
drummer83 opened this issue Dec 1, 2021 · 5 comments · Fixed by #8556
Closed

Super admin navigation showing for regular enterprises #8546

drummer83 opened this issue Dec 1, 2021 · 5 comments · Fixed by #8556
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround.

Comments

@drummer83
Copy link
Contributor

Description

The super admin navigation is showing for regular enterprises if they want to create new payment or shipping options directly through the admin/enterprises page. When selecting one of the links in the navigation, the page "unauthorized" opens.

Background:
Issue #7937 reported that the super admin navigation was missing on some super admin pages. It was first addressed in #7967 and seemed to be fixed by #8395.

Expected Behavior

The super admin navigation should only show for super admins.

Actual Behaviour

The super admin navigation is displayed for regular enterprises if they want to create new payment or shipping methods directly through the admin/enterprises page by clicking 'create new'.
The pages admin/shipping_methods/new and admin/payment_methods/new seem to be affected (maybe more).

Steps to Reproduce

  1. As a regular user create an enterprise without payment and shipping methods.
  2. Go to admin/enterprises.
  3. Open the 'status' field with the red warning sign.
  4. Click 'Create new' for shipping or payment method.
  5. Observe that the super admin navigation is displayed on the right of the screen

Animated Gif/Screenshot

Click 'create new' to access the broken pages:
grafik

On this page the navigation on the right should not be displayed:
grafik

Workaround

None.

Severity

bug-s2: a non-critical feature is broken, no workaround
Users reported that they tried to create shipping and payment methods through the links in the super admin navigation - which fails due to the unauthorized page.

Your Environment

  • Version used: v4.1.8
  • Browser name and version: Firefox 94.0 (64-Bit)
  • Operating System and version (desktop or mobile): Ubuntu 20.04 LTS, Desktop

Possible Fix

@drummer83 drummer83 added the bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround. label Dec 1, 2021
@drummer83
Copy link
Contributor Author

@sinansonmez Would you be willing to have a further look at this? Your first improvement was great already!

@sinansonmez
Copy link
Contributor

Hey @drummer83 Unfortunately i will not be able to work on this. I am pretty busy nowadays.

@lin-d-hop
Copy link
Contributor

Unless this is an easy fix I suggest we need to revert the previous change.
This situation is far worse than the original fix for which just a few super-admin pages were impacted.

Since this issue will now take dev time from the core team for an issue that was originally prioritised I would suggest that we need to take the fastest route to resolution.

@sinansonmez
Copy link
Contributor

Sorry, I didn't realize that this issue is due to my #8395 PR. I feel responsible now 🥲 I will spare some time and try to fix it asap

@sinansonmez
Copy link
Contributor

As promised, I managed to spare some time and created PR to fix the issue. Right now I am checking if user is super admin and only in that case I am showing the navigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s2 The bug is affecting any of the non-critical features described in S1 and there is no workaround.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants