cakephp controller level Authentication -


i doing tourism system in cakephp, have 2 different kind of end-users, 1 admin , register users, need 2 different view users , registers users should not access controllers of admin module,

now don't know how separate 2 users.

by sounds of you're looking prefix routing should provide need.

your url can prefixed admin (if applicable user in question):

http://example.com/admin/posts

which routed (in posts controller):

public function admin_index(){     ... } 

which renders app/view/posts/admin_index.ctp view.

i'm not going more because documentation quite thorough in area. please aware if start introducing more 2 levels of privilege (e.g. user, super-user, administrator) prefix routing isn't suitable. need take @ access control lists instead covered framework.


Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -