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
Post a Comment