pengkong / A3M-for-CodeIgniter-2.0

A3M Peanutbutter - For CodeIgniter 2.0
Other
110 stars 84 forks source link

How to use Account Roles? #4

Closed viperfx closed 12 years ago

viperfx commented 12 years ago

Is there a guide on how to use account permissions or using different user levels?

pengkong commented 12 years ago

nope im sorry there isn't one. also its not full developed.

On Thu, Dec 15, 2011 at 6:33 AM, viperfx < reply@reply.github.com

wrote:

Is there a guide on how to use account permissions or using different use roles?


Reply to this email directly or view it on GitHub: https://github.com/pengkong/A3M-for-CodeIgniter-2.0/issues/4

Best Regards, PK

viperfx commented 12 years ago

Oh that is such a shame, im trying to build a backend interface for my applications, and I would like to have 3 different user roles. Do you have an resources or tutorials that can help?

pengkong commented 12 years ago

wrote this awhile back. im not sure if its helpful. but that's what i was thinking back then.

You can fork the project on git and implement it yourself tho. What I've done is slightly outdated by now but it can still serve as a good guide and reference.

Everything revolves around permissions. Permissions can be assigned to a user or to a role. Roles can be assigned to a user.

  • *

Created one method that accepts user id & permission id then returns true or false depending whether or not the user has that permission.

  • *

_function has_permission(user_id, permissionid) { Check if user has permission Check if user has role that has permission

  • *
  • Return either true or false

    }*

  • *

That's basically it. Then you will need to build an interface to manage roles permission and users. And of cuz assigning permission to users and roles and assigning roles to users.

On Sat, Dec 17, 2011 at 5:08 AM, viperfx < reply@reply.github.com

wrote:

Oh that is such a shame, im trying to build a backend interface for my applications, and I would like to have 3 different user roles. Do you have an resources or tutorials that can help?


Reply to this email directly or view it on GitHub:

https://github.com/pengkong/A3M-for-CodeIgniter-2.0/issues/4#issuecomment-3182648

Best Regards, PK