samedi 6 novembre 2021

Which design patterns to use in this scenarios?

this is my first application and I want to design a solution for my use and I don't know how to do it using design patterns. I need to return different data depending on what type of user will query. All this data will be returned in the same response:

  1. owner - has access to all his stores and when he calls this endpoint it will return all products without any restrictions (wholesale prices/internal descriptions), and some additional data returned only for the owner without any restrictions.

  2. store - employees should only have access to store specific products and additional data returned from various tables (but some of these tables are store specific only)

  3. customer - will only be able to return one product at a time with limited data and no additional owner/store specific data.

There is a chance that in the future accountants or directors will have access to other limited data.

Is there a solution that will work for my specific scenario?

Aucun commentaire:

Enregistrer un commentaire