CodeIgniter Forums
roles with ion auth or Community Auth - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11)
+--- Thread: roles with ion auth or Community Auth (/showthread.php?tid=64293)



roles with ion auth or Community Auth - Mitteg - 02-04-2016

Hello,

I run the lastest version of Codeigniter 3 and I would like to use either one of these two authentication libraries:

Ion Auth (http://benedmunds.com/ion_auth/)
Community Auth (http://community-auth.com/)

BUT,

Not interested in the auth part because I the authentication process is handled by my company (we use CAS auth) so I only need the roles functions of these two libraries.

1. Lauch the CAS auth function which returns a username that has been loogged in.
2. Store this username to a session variable
3. We have a SQL table with all the usernames and their respective roles (admin, superadmin, std user, etc)
4. Each role has different access privileges to different parts of the website
5. HOW do I implement these roles/privileges in my codeigniter code? In the controller? Could these two libraries help me out with the access privileges? Any example on how to do this?
6. Last but not least, I do not understand why CI does not provide built-in functions for handling roles as it seems to be a basic feature of any web application.

Thank you very much.


RE: roles with ion auth or Community Auth - skunkbad - 02-04-2016

If you already have authentication, and you already have user tables with roles, then I don't think Ion Auth or Community Auth is going to do what you want to do. If I was you I'd just look at making custom modifications to your authentication so it has roles.


RE: roles with ion auth or Community Auth - Mitteg - 02-04-2016

Ok, just what I was thinking. Thanks a lot!

(02-04-2016, 01:20 AM)skunkbad Wrote: If you already have authentication, and you already have user tables with roles, then I don't think Ion Auth or Community Auth is going to do what you want to do. If I was you I'd just look at making custom modifications to your authentication so it has roles.