-
Notifications
You must be signed in to change notification settings - Fork 26
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
add conditional to show reports menu tab #4
add conditional to show reports menu tab #4
Conversation
Hey @ccarruitero, thanks a lot for this PR! Can you elaborate a little bit on why this patch is needed? Also, can you have a look at the specs? Seems like one of them is failing |
@ccarruitero thanks for this PR, this change would remove the non-admin user roles ability to see the reports, I think this is not necessary because as non-admin user rol you be able to see the orders, so the reports related to orders as well, what do you think? @aitbw |
@jtapia until I know all admin tabs are hidden for users that can't admin the resource. https://github.com/solidusio/solidus/blob/master/backend/app/models/spree/backend_configuration.rb#L94 @aitbw looking into the spec failing, I found that you are using a custom authorization in that spec. Isn't a critical change anyway. You can close if prefer |
@ccarruitero basically is the same behavior like here https://github.com/solidusio/solidus/blob/e6f648f8034443600428be26ffe611833a3e50b2/backend/spec/features/admin/homepage_spec.rb#L68 you can fix the broken spec changing the |
@jtapia I just did the change that you proposed. Aside, I was thinking that an alternative fix could be add the permission into the custom authorization block, but is not working. Do you think I missing something? |
Restarting Travis, now it should be all green. It was failing for an issue in 2.8 that has been fixed recently. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ccarruitero looks good to me, thank you 👍
Can we merge this one? |
@ccarruitero can you please rebase with master? After that, we can merge the PR... thank you! |
153efb3
to
caee0b4
Compare
@spaghetticode I just updated the branch |
This fix to show menu in admin even when user is not logged.