Thursday, January 23, 2014

Complex "fluid" user/company structure

Hi

Just for brainstorming ;) Think of the following structure:

#1:
Company 1 (e.g. administration house)
     Company 2 (e.g. managers)
          Company 3 (e.g. "regular" company)
               Company 4 (e.g. subsidiary of a company)

#2:
Users

...with roles (ACL controlled) which belong to a certain company above. These could (!) have relations in between. So "User 1" could be a manager of "User 2" at every point of the structure a.s.o.

Unfortunatly this layout is fluid :( So there could be more or less levels of companies as shown above.

Each user of a specified company-level should only see and manage "his" users down below the tree.

Tree! Hooray! That comes first to my mind, but could this thing be achieved with the build-in TreeBehaviour, so I could keep queries simple and straight-forward? e.g. searching for a specified company will give all (!) related users (and data) of all related companies down the structure?

And to make this complete, users (whit ACL rights) can manage (edit/create) a company down the tree again.

What do you think? I need a push into the right direction ;)

Thanks,
Frank

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.

No comments: