S
S
Steve2021-06-08 11:39:17
PHP
Steve, 2021-06-08 11:39:17

Organization level control?

I'm working on a large project and the task is to add a new level of control for various endpoints. For example, there are 2 endpoints: concatcs/, groups/. Each client has an account and each client is limited in creating contacts and groups depending on the amount he has in his current account.

There are also 2 databases: one with data on contacts, groups, everything else, etc., the other with data on payments and information where it is indicated how many contacts and groups a client can create.

So since you need to add the same controls in different places in the API, you need something reusable and flexible to avoid code duplication.

What is the best way to organize it? I ask for your options.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Derepko, 2021-06-08
@CenterJoin

https://symfony.com/doc/current/security/voters.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question