How to root permissions effectively? (CI 3.11) |
I don’t see why all the controllers extends the level underneath them (admin -> mod -> user...). Why can’t they just extend your CommonController?
In an old CI3 project I made some time ago, my approach was a library to deal with the user’s authorization. The user’s info are in the session. The constructor in the common controller call a function from that lib to see if the user is logged in and has the right permission. If not it redirect to the login page or an error page.
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/ |
Messages In This Thread |
How to root permissions effectively? (CI 3.11) - by hobbyci - 01-08-2021, 08:31 AM
RE: How to root permissions effectively? (CI 3.11) - by includebeer - 01-09-2021, 06:45 AM
RE: How to root permissions effectively? (CI 3.11) - by hobbyci - 01-16-2021, 11:39 AM
RE: How to root permissions effectively? (CI 3.11) - by InsiteFX - 01-17-2021, 12:38 AM
RE: How to root permissions effectively? (CI 3.11) - by hobbyci - 01-18-2021, 10:44 AM
|