im trying to use codeigniter to create a simple website that involve user restricted areas,
and was wondering how can i design my log in controller so that on every page it load a controller that check if this user is allowed in this page/allow to execute that function.
Question:
- how can i autoload this login function at every page.
- what is the proper secure logic to check for if user is allowed to do this function ? noting that i have 3 different user types, 1.admin 2.secretary 3.worker so how can i assign functions to there owner ? "admin should be able to assign access to other 2 types"
i have completed my project but i have 0 experience with this login user access control thing so any advice will be appreciated