Welcome Guest, Not a member yet? Register   Sign In
Writing Admin/User/Public controllers to insure authentication
#1

I'm migrating a largish site to CodeIgniter 2 and we have roughly three types of pages we host:
* Public pages like about-us, documentation, etc.
* User pages that require an authenticated, registered user to be logged in
* Admin pages for our internal employees who are authenticated & registered with a different access_level than your run-of-the-mill users.

I am trying to mimic this tutorial:
http://avenir.ro/codeigniter-tutorials/n...ontroller/

Basically, I'm trying to follow best practices in organizing my controllers such that I can easily force appropriate authentication for the appropriate user access level. I wonder if I'm following the right approach and can dimly foresee that such an approach may have a pretty restrictive effect on how I organize my controllers. If it works right, however, I can expect to avoid a lot of redundant code to check for authentication, etc.

Also, I'm wondering if using hooks as described in the article is in fact the recommended way to go.

Any input would be much appreciated. Thank you!
Reply


Messages In This Thread
Writing Admin/User/Public controllers to insure authentication - by sneakyimp - 12-22-2014, 03:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB