You are not logged in.
Pages: 1
Hello,
I need to develop ACL system to my project. Now I'm wondering that what are those resources? Do I simply put every url into database? I mean that if I have url like http://www.example.com/draft/index/show/id/1, should I put that url (/draft/index/show/id/1) into database or what? Or should I put only url to the action (/draft/index/show) to the database and then in code find out if the currently logged in user owns the resource?
Any suggestions how to do this properly?
Offline
I think you are trying to give user privilege on the basis of login parameters.
If it is then you have to store your path in database and also have to assemble in proper url format. It can be easily developed.
Demo--
1. Store all the modules name in table1 ( if you are using modular structure )
2. Store all the controllers name in table2 and map it to module using additional column [ Example - MODULE_ID ]
3. Store all the actions name in table3 and map it to controller using additional column [ Example - CONTROLLER_ID ]
4. Make additional table to give user privilege [ Example - User1 => Module_1 , This means 'Module_1' is accessible by 'User1' ]
So you stored all the resources in database part by part.
Now on the basis of your condition assemble the path ( ex- /Module_Name/Controller_Name/Action_Name ) and give a role
Hope these will help you -- ![]()
Offline
Pages: 1