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

add conditional to show reports menu tab #4

Merged
merged 2 commits into from
Oct 16, 2019

Conversation

ccarruitero
Copy link
Contributor

This fix to show menu in admin even when user is not logged.

@aitbw
Copy link
Contributor

aitbw commented Feb 13, 2019

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

@jtapia
Copy link
Collaborator

jtapia commented Jun 5, 2019

@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

@ccarruitero
Copy link
Contributor Author

@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.
Not sure, why is necessary all that context?

Isn't a critical change anyway. You can close if prefer

@ccarruitero
Copy link
Contributor Author

@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?

@kennyadsl
Copy link
Member

Restarting Travis, now it should be all green. It was failing for an issue in 2.8 that has been fixed recently.

Copy link
Member

@spaghetticode spaghetticode left a 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 👍

@cedum
Copy link
Contributor

cedum commented Oct 10, 2019

Can we merge this one?

@spaghetticode
Copy link
Member

@ccarruitero can you please rebase with master? After that, we can merge the PR... thank you!

@ccarruitero
Copy link
Contributor Author

@spaghetticode I just updated the branch

@spaghetticode spaghetticode merged commit d973af5 into solidusio-contrib:master Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants