Reputation: 4974
how I can make a user based permission system?
The basic is: I will have pages (account, foo, bar, etc..) and actions (add, edit, delete, etc..), and, each user can have permissions based on responsabilities.
If, I want a user to add new users, I need to add the page 'user' and action 'add', for instance.
I have tried Cake ACL, but, I can't get a idea.
Upvotes: 0
Views: 146
Reputation: 1540
Implementation of Auth and ACL component is the best idea for user based permission, for detail study you can refer to following url:
This url gives us full implementation of ACL component with example data... Try this and if have any issue please let me know
Upvotes: 1
Reputation:
Cake gives you a great solution for these problems with function isAuthorized().
You can learn it from here or you can read it from documentation.
public function isAuthorized($data){
return true;
}
Upvotes: 1