Hi, I'm building a site using Drupal Commerce and Commerce File to sell software. Using Organic Groups, we hope to group users by their employer. Anytime a file is purchased we hope to make it available to everyone in the company, or the private group.

I've added a Groups audience to the Commerce Order Entity and cooked up a View that works perfectly for the admin. However, other group members can not see the order or the results the View returns.

How can I make the completed orders, specifically line items, available to group members while gating access to nonmembers?

Comments

toby53’s picture

Help, We are willing to pay a bounty of $50 US to anyone who can come up with a solution !

I'm working on this issue too.
As a test I changed the uid on the commerce order and file license to the uid of one of the group member and they can see the order. However; others within the group ( except for admin ) cannot see the order. There is nothing about individual ownership of the order in the view query that I can see.

rszrama’s picture

Status: Active » Closed (won't fix)

I just closed out a related issue, #1531602: Pass entity to Commerce entity access check contexts. Basically, you're going to have to figure out how to grant access to those orders to additional members of the group. You can use the API like outlined in that related issue or you could just create a View accessible only to members of the group that included the order details.

We don't actually do support in the issue queue any more, so if you have follow-up questions, please repost to http://www.drupalcommerce.org/questions instead. Thanks.