Re: My Scenario
Lukas Kahwe Smith <[email protected]> Sun, 04 Sep 2005 23:54:59 +0200
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Afrim S. wrote: > My prolem here is that i do not have any documentation or sample applications on how i would make a most advanced permission system with LU(something like, "Demonstrate the scope of LU"). I just need a sample of the HR and SuperUser of how i would add the users/permissions/groups. The most advanced use of LiveUser that is freely available is likely the WebBuilder application framefork: http://oss.backendmedia.com/index.php?area=WebBuilder2 However even there its left up to the developer how to structure his rights. > Would i also be able to add these permissions to each right: add job, delete job, view job within the ManageJob right. This is starting to sound more like you want to create an area for each "right" .. note at this point we should stop using the term "right" the way you are doing to avoid confusion. I dont know if you have read my LiveUser article (http://phpmag.net/itr/online_artikel/psecom,id,595,nodeid,114.html). But there is a section where I talk about RBAC. This standard uses the terms users, roles, permissions, objects, and operations. It sounds like what you call "right" is an object onto which you can grant a certain set of operations. The way to do this in LiveUser as the article explains is to dynamically create an "area" for each object and then create a right per operation. Also note that there is a cool feature called "area admin" that would allow you to grant all rights for an area to a single area in a single go. Furthermore there is a superadmin permission type that automatically grants the given user all rights in the system. For an area admin you need to set the perm_type in the perm_users table to 3 and insert the necessary relations into the area_admin_areas table (http://pear.php.net/package/LiveUser_Admin/docs/0.3.4/LiveUser_Admin/LiveUser_Admin_Perm_Complex.html#methodaddAreaAdmin). A superadmin is defined by a perm_type of 4 or more. regards, Lukas