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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -