Q
Q
QNA-19762020-02-05 16:18:00
PHP
QNA-1976, 2020-02-05 16:18:00

Where it is possible to find normal implementation of control authorized?

Well, on a procedural I can file a redirect function and shove it into each page module, that is, I know in advance which page is for authorized and which is not.
I climbed the net, what do I find? I find the implementation of authorization in ONE VIEW, where the authorization form when checking the token is replaced by an alleged zone authorized by a redirect to itself: that is, something like this

if ($token) {
    // типа сайт для авторизованного
} else {
    // форма авторизации
}

Not satisfied, maybe someone knows where to look for a competent implementation to close pages from access, depending on whether the user is authorized or not?

Well, what I have enough imagination for is to check in the base controller if the current controller is authorized and the start controller, then redirect to the home controller and vice versa, if it is not authorized and the current controller is NOT the start controller, then redirect to the start one)))

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2020-02-05
@SilenceOfWinter

The specific implementations of RBAC, ACL that you are looking for are tied to the architecture of applications / frameworks, incl. You will have to write most of it yourself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question