LinnSystems / LinnworksNetSDK

Linnworks.net Developers
26 stars 41 forks source link

Orders/GetOrderViews. Not retrieving authorised user views #1

Closed RigidasSoftware closed 8 years ago

RigidasSoftware commented 8 years ago

When calling Orders/GetOrderViews, I was expecting the views assigned to the authorised user to be returned.

However it appears that the application is created as a new user and a default set of views is generated and returned. This is not very helpful when trying to get orders for the user filtered by the view that they have created.

To Reproduce

  1. Create custom view
  2. Authorise application
  3. Call Orders/GetOrderViews
  4. The views that are returned are the default rather than the users custom views.
LinnSystems commented 8 years ago

Views per view is not yet implemented. The Open Orders controller is not yet surrounded with permissions.

p.s. just a free advice for the future comms, when using words like "useless", "crap", "wtf" doesn't promote quality of communication, you should know that as a developer if you are one.

RigidasSoftware commented 8 years ago

Good morning. I understand my mistake on the wording.

I assume views per view is a global view with permissions per user? If so then this sounds good for our use in the future.

LinnSystems commented 8 years ago

Hi,

Each user has a a set of views. Because Application is effectively a user it has its own set of views created by default. From application you can create new views and use them for getting orders.

The way it works at the moment, due to change is that you don't actually specify the view name to get the orders, instead you are filtering the open orders directly. Once we introduce permissions into the open orders the following things will be available:

1) a user (an application) can have permission to filter open orders with any filter or have a permission to a method which retrieves orders per a specific view 2) admin can create views for the user (an application) and restrict access to creating and modifying those views, thus locking access to a specific orders for the user/app 3) you can use method to retrieve orders for a specific view from the application.

As it stands now, I recommend simply using GetOpenOrders method with filtering and ignore the concept of views if all you care about is retrieving specific set of orders.

If you want to manage the views similar to how linnworks.net - use CreateOrderView (use fiddler to see how the view object is assembled as there is no clear documentation)

RigidasSoftware commented 8 years ago

Hi. Thanks for the help here. We were are happy with the filtering concept, and understood that the views returned the filters as per the customers requirements which is good as they would not have to reconstruct the same view within our application.

I look forward to further developments.