Gabriel Santos
Gabriel Santos

Reputation: 4974

User based permission

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

Answers (2)

Krishna
Krishna

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:

http://book.cakephp.org/2.0/en/tutorials-and-examples/simple-acl-controlled-application/simple-acl-controlled-application.html

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

user1612882
user1612882

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

Related Questions