Hi Don, Sorry for taking so long to reply (study commitments) basically your suggestion works brilliantly - I'm only annoyed I didn't realise your suggestion myself.
Thanks again for saving me a lot of agro :) --Felix [My e-mail load: http://courteous.ly/AXc5sh] On Thursday, 5 May 2011 at 23:49, dreamingmind wrote: > Felix, > > I'm not aware of anything that would prevent a User from having > several connections into the aros table. You have three fields in aros > that can potentially play a role in connecting a user to an aros node: > alias > model > foreign_key > > If you had a president that was User.id=12, you could easily have > several records that read Aros.model='User' Aros.foreign_key=12 and > that were each children of different aros parents (or you could use > alias to do the job). Once could be a child of President, another the > child of Instructor/Theory. > > Each child would have different acos permissions and your > authentication check would just have to look out for the multiple > permissions. > > So let's say you set alia to a concatenation of model and id like some > of the tutorials do, your aros tree could look like this: > > ---- Overlord (a master account) > ----- Committee > --------- President > ------------- User::12 > --------- Treasurer > --------- etc. > ----- Instructors > --------- Practical > --------- Theory > ------------- User::12 > ----- Trainees > > Regards, > Don > > On May 4, 2:35 pm, Felix <[email protected] > (http://felixfennell.co.uk)> wrote: > > Hello everyone, > > > > I have a query regarding how to structure the ACL system in my app. > > > > Basically i'm creating a management app for a diving club. The club > > has three broad groups, > > > > - Instructors > > - Trainees > > - Committee > > > > The ACL tree looks like this at the moment > > > > - Sebastian (name of site) > > ---- Overlord (a master account) > > ----- Committee > > --------- President > > --------- Treasurer > > --------- etc. > > ----- Instructors > > --------- Practical > > --------- Theory > > ----- Trainees > > > > Each position above is a group (name, description) which have many to > > one relationships with a user (username, password, name). > > > > The above system works fine except for one problem. Committee members > > are always either an instructor or trainee, therefore they need to be > > assigned to two groups (instructor/trainee AND the relevant committee > > position). > > > > Basically I need to place a user into two levels in the tree which > > aren't related to each other hierarchically. > > > > As far as I know this isn't possible with Cake's ACL component unless > > theres something I've missed. I know the relationship between groups > > -- users needs changing to a HABTM relationship but I'm unsure how ACL > > treats these. > > > > Has anyone come across this sort of problem before and able to outline > > their solution, or have I been an idiot and missed something really > > obvious. > > > > Sorry for such a long message, I didn't want to miss anything out - > > thanks in advance, > > > > --Felix Fennell > > -- > Our newest site for the community: CakePHP Video Tutorials > http://tv.cakephp.org > Check out the new CakePHP Questions site http://ask.cakephp.org and help > others with their CakePHP related questions. > > > To unsubscribe from this group, send email to > [email protected] For more options, visit this group at > http://groups.google.com/group/cake-php -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
