What permissions do I have in a 'full' Order Cycle

Continuing the discussion from How do Order Cycles work for Users with multiple Enterprise types and permissions

When the Coordinator is ‘any’ (i.e. it is a Hub), the full OC interface will be loaded. This page outlines who is able to do what . . and becomes the test conditions for a variety of Users interacting with order cycles via P-OC.

Order Cycle is ‘Invite Only’

Only enterprises that have granted P-OC to the Coordinator can be added to the Order Cycle.

As the Coordinator, I can

Create and Coordinate

  • Create Order Cycles
  • Set the name, open and close dates
  • Once the Order Cycle is created, I cannot change the Coordinator

Add other Enterprises and create ‘Exchanges’

I can create Exchanges for all valid Enterprises that have given P-OC to me and the outgoing Hubs. This means:

  • ‘Incoming’ Enterprises - I can add any Producer that has given the Coordinator P-OC
  • ‘Outgoing’ Enterprises - I can add any valid Hubs (type ‘any’) that have given the Coordinator P-OC . . (shows greyed in list if validation conditions not met). Validation conditions are:
  • Has at least one shipping and one active payment method
  • Contact email has been confirmed (this is where order confirmation emails will be sent)
  • ‘Outgoing’ Hubs can only include Producers that have given P-OC to that Hub as well as the Coordinator

Order cycle should not:

  • include Enterprises who have given P-OC to any of the User’s other enterprises (but not the Coordinator)

Access and Attach Fees

  • I can access and attach the fees of all enterprises that have given P-OC to the Coordinator, to any exchange in the OC [OR any of the User’s enterprises]
  • I can only edit the fees for Enterprises I manage

[BUG: currently brings enterprise up but doesn’t let me see or allocate the fees]

As a Enterprise that has granted P-OC to a Coordinator

Once I have been added to an Order Cycle, I can

  • see Order Cycles my Enterprises are in on my OC summary page
  • open those order cycles to edit my involvement. This means:
  • I can see but not Edit the Coordinator
  • I can see but not Edit the name, open/close dates etc
  • If I am a Producer, I can
    • view exchanges that include me
    • remove and add my products to my incoming Exchange
    • add / remove my fees to my incoming Exchange
  • If Outgoing Hubs have NOT granted me P-OC
    • I can view but not edit my products in their outgoing exchanges
  • If Outgoing Hubs have granted me P-OC
    • I can also add and remove my products from their outgoing exchanges
  • If I am a Hub:
  • my exchange can only include Producers that have given me (and the Coordinator) P-OC
  • I can remove any products from my outgoing exchange
  • I can add the products of Producers already in my outgoing Exchange
  • I can add products of Producers in the OC, if they have granted me P-OC
  • I can add / remove my fees from my outgoing exchanges

NB. Only the Coordinator can add incoming exchanges for producers into the Order Cycle. So even if a producer has granted P-OC to a Hub that is included in the OC, that Hub can not create a new incoming exchange for that Producer. This feature will be considered later, see ‘open’ order cycle

Questions

how fun is this @sstead and @oeoeaio - prepare for testing extravaganza!!

@NickWeir @alexisG maybe worth a read of this in relation to the problem you’re having with the order cycle BUT I’m not sure why it would be pushed into the uk staging server yet as we’re still testing here (@paul)

i suspect you need to look at enterprise type - Users and Enterprise Types

Just did some testing and it all seems to be working :slight_smile: A few minor things i picked up…

• ‘Outgoing’ Enterprises - I can add any valid Hubs (type ‘any’) that have given the Coordinator P-OC . . (shows greyed in list if validation conditions not met). Validation conditions are:
o Has at least one shipping and one active payment method
o Contact email has been confirmed (this is where order confirmation emails will be sent)

This works well, but I think ‘email not verified’ would be more meaningful to people than ‘unconfirmed’.

• include Enterprises who have given P-OC to any of the User’s other enterprises (but not the Coordinator)
Yes, this is true.
However, If P-OC is revoked, an established order cycle, that’s already stocking the products, will continue to stock them. Further, if this order cycle is duplicated, it will continue to show the products of the enterprise which no longer grants P-OC. Only a new order cycle will remove this enterprise.

[BUG: currently brings enterprise up but doesn’t let me see or allocate the fees]
This seemed to be resolved for me. Both of the dropdown menus were displaying (Enterprise name and fee name).

If I am a Producer, I can
- view exchanges that include me
- remove and add my products to my incoming Exchange

Yes, the producer can add/remove incoming products…but, there’s a slight issue with how the numbers display… see image…

If I am a Producer, I can
-add / remove my fees to my incoming Exchange

Yes, I can add/remove my fees. I can create new ones and apply them too. One very minor issue … below…

one more minor thing…

Note: A distributor can’t change the incoming products. Even if there is 2 way P-OC between the producer and distributor… But, the availability of this check box makes it seem like they can…

@sstead you are amazing . . I am promoting you to testing manager!! are you in tomorrow (friday) to discuss some of this and workflow things? :smile:

see https://github.com/openfoodfoundation/openfoodnetwork/issues/499

this is a bit confusing . . but it is also kind of ‘correct’ . . if the producer were to re-apply that product to the order cycle it would be re-included in the outgoing exchange, so it is kind of selected. Not sure whether we should change this to reflect the number actually included / available or not . .

great pick-up . . I think this one needs to be a new git issue - something like ‘duplicating an order cycle should check P-OC and remove enterprises and exchanges where permission no longer applies’; core; probably backlog

One more little thing…