I know I can make the redirect manually, but I think it's possible to make a redirect look good in macro, something like that:
#[has_permissions("ROLE_ADMIN", redirect = "/login")]
That is the response, right? We can make a redirect there, if it was passed in macro. Does it make sense?
Upd: I guess not, that's repeating. We need middleware for that I guess.
I know I can make the redirect manually, but I think it's possible to make a redirect look good in macro, something like that:
#[has_permissions("ROLE_ADMIN", redirect = "/login")]
That is the response, right? We can make a redirect there, if it was passed in macro. Does it make sense?
Upd: I guess not, that's repeating. We need middleware for that I guess.