Answer the question
In order to leave comments, you need to log in
I want to write my own AccessControl filter to set access to controller actions from the admin panel, what is the best way to do it?
Please advise. I want to write my own AccessControl filter to set access to controller actions from the admin panel.
The idea is this in the behaviors of each controller, I will pass actions and the name of the controller to my filter, and the filter, based on the settings saved in the file for this controller, will issue access permissions to each Action for the configured roles. Basically, I understand how to do it. But the question is different, in the admin panel in the role settings I want to display all the controllers and their actions in order to configure access control for each action of a specific controller for a specific role. The question is, How elegant is it to define which controllers exist throughout the project and which Actions they have to give them access settings. I know you can check all the classes in the project every time you enter the role settings and select only controllers and look at actions in them, but I think that this is a crutch and there should be another method.
In general, advise how to be or give examples where this is embodied to see?
Thanks
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question