Welcome Guest, Not a member yet? Register   Sign In
Manage users by user creator
#1

Hi All,

I've been using codigniter for a Saas application.

I have a multi-level user system with permissions to certain features.

I have a group of users that can create other users with less privileges.
What I want is for each user in this group to only be able to view and modify the content created by the users that they've created.

I'm not sure how much more detail i need to go into on this but I've hit a wall and would like if someone could point me in the direction on how to go about it.

I have one thought on this:

The group that can create users (lets call them the moderators) i add an additional table or use that moderators unique id and attach it to the the users they create (lets call them authors) so that the moderators can only view and edit the profiles of the authors they've created and then moderate the content of those authors and not the authors created by other moderators.

Likewise, the authors should only be able the modify the content that they've created.

Some guidance would be appreciated.

I'm a noob and don't know how to code, so please keep that in mind.. I build the things by reading the docs and everything else that is of relevance.

Thanks
Reply
#2

Store the user id of the user that created the new user in there table record.

Then you can check the user id and allow or dis-allow them from viewing records.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB