0

I am trying to create a role and assign it to a user who can view the admin orders list page and also edit the orders.

After adding all the permissions under the order sections in the permissions page, I was not able to access the list of the orders but was able to see the orders separately and edit them using the order number.

admin/commerce/orders page was accessible but the list was not showing.

Why is this happening? Is there any way fix this? From the screenshot, you can see that I have given all the required permissions with respect to orders.

enter image description here

Any help is much appreciated.

0

After comparing the query being executed for the admin user and the non-admin user I found that 1=0 is being added to the commerce_orders view's query.

Further checking out the code, it seems that in the commerce.module file, the code expects either shipping or billing permission being granted to the user.

After adding one of them, the list was visible. I don't know why it's like this, List of orders must not expect that permission right?

TLDR; Adding the billing/shipping permission fixed the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.