RE: My Scenario
"Jan Bolmeson" <[email protected]> Sun, 4 Sep 2005 17:14:19 +0200
| Newsgroups | gmane.comp.php.pear.liveuser |
|---|---|
| Message-ID | <[email protected]> |
Hi Afrimi, Depending on how complex your application is going to be there are several ways to solve the problem. The first solution that comes up in my mind (others may post better solutions) is to use the complex perm-container in LU. Then also depending on what container (i.e. MySQL, XML, MDB etc) you use will affect the way you will have to set up LiveUser. > I have an application where i have Users(Candidates) > that have signed up for an account and they apply for > a job(let's say),i call it the Candidate section. I > also have a section where a person manages the Jobs > the HR. Now, the last but not least i have another > section that is about maintaining the whole > application and all the usertypes. > > So the Candidate has to manage his own profile, no > more permission elsewhere. > The HR manages the jobs and the Candidates, because > the HR is in grater permission than the Candidate. The > SuperUser can take care of everyone else since he's > the top guy. Something like a Student(Candidate), > Teacher(HR) and the Principal(SuperUser) > > How would i be able to do this in LiveUser. I've seen > examples and i can do that with no problem but my next > concern is that i need to give HRs different > permission so that they can not remove the Candidates( > something like a teacher can not hit a student, the > idea!). So i want to be able to give the HRs different > permissions to manage the Candidates and his section. > The same goes for the SuperUser, i can give only one > permission in the whole SuperUser section or many, > and/or i can give one or many permission to manage > the HR sections as well. The whole idea is that as you > are at the top you have more permissions and can do > anything your allowed to. Something like this: "I have > all these x,y,z permissions; now give a person > permission x and z". > [Jan Bolmeson] If you use the Complex-perm container you will be able to define groups, grouprights and groupusers. I would in your case define a couple of groups i.e. Candidates, HR and Superuser. The I would create different rights, i.e. addJob, applyForJob, manageJob, x, y z. Then you are able to assign these rights to each user depending on your mood... =o) But with many users it becomes unpractical to assign userrights. This is where I use the grouprights. Instead I assign the different rights to a group and then I make the user member of the different group(s). Hence The user inherits the different rights and everything that you will have to manage are different group memberships. The problem that arises with my solution is when you want a user to have all the rights assigned to a group except for one. Since this solution does not allow for disabling rights. Hope this gives you a pointer into the right direction, Jan