Welcome Guest, Not a member yet? Register   Sign In
flexi auth - A user authentication library for CodeIgniter
#91

[eluser]haseydesign[/eluser]
Hi rtan,

The library includes two features that should help you with defining user roles; user groups and user privileges.

User groups are essentially used as a general category to define the primary role of a user - for example public users, moderator users, editors, etc. - they can be assigned whatever group name that you require. Once a user is assigned to a user group, it is then possible to use functions within the library to check which group the user belongs to, and then perform actions dependent on that group - for example public users could be prevented from accessing an admin only area of the site.

This level of user access detection will likely cover most basic website requirements for user access permissions to sensitive areas of a site.
However, the larger a site gets, the more technical some of the access permissions can get.

For example, lets say within an admin only area of a site, all admin users need to be given read-only access to some sensitive data, this could be easily accomplished by just defining an 'Admin' user group. If then some specific admin users needed to also have write access to this same data, you can no longer rely on the 'Admin' user group to control access, you need to add additional permission checks. This is where the user privileges come in, we can assign the write access permissions to these specific users, without granting the access to all admin users.

By using user groups and privileges together, you can have finer control over user access rights rather than having to create multiple user groups for users potentially having very similar roles.

I hope that helps.


Messages In This Thread
flexi auth - A user authentication library for CodeIgniter - by El Forum - 10-30-2012, 01:54 AM



Theme © iAndrew 2016 - Forum software by © MyBB