Welcome Guest, Not a member yet? Register   Sign In
Big Project but where to start??
#2

[eluser]PowerCode[/eluser]
Ok, I guess the main problem you're facing is with ACL. I'd highly recommend taking a look at Zend's ACL component. Head on the framework.zend.com. You don't need the entire framework (even though you'll have to download it all), just the ACL component and its dependencies. That's the beauty of Zend's loose coupling.

Next, you can create ACL roles just like you have in your mind (with hierarchy etc.).

Basically, you have

1. A school, administered by a Head Teacher (Super-Admin kinda thing)
2. Next, you have Teachers, signing up (Admins ?)
3. Pupils can be given a separate role (kinda like normal users on a site)

You can query Zend's ACL after creating roles and resources, it'll take care of hierarchy and other stuff, and simply tell you whether a role is allowed to access a specific resource.

If you'd like a pupil to be "under" a specific teacher other than the school, you can have a teacher_id foreign key. If you want a pupil to belong to multiple teachers under a school, but not all, you can use HABTM type relationship which you can code yourself (you can take a look at website tags tutorials over the net to get the idea of the concept).

Also, after the authorization, you can perform additional checks like e.g., A Head-Teacher might have the ability to add/remove notices, but only as long as that notice belongs to the school to which the Head-Teacher belongs.

I'm in a slight hurry, so couldn't go in detail. If you can explain your problem more, the community could help better.


Messages In This Thread
Big Project but where to start?? - by El Forum - 12-17-2008, 07:02 AM
Big Project but where to start?? - by El Forum - 12-17-2008, 08:44 AM
Big Project but where to start?? - by El Forum - 12-17-2008, 03:14 PM
Big Project but where to start?? - by El Forum - 12-19-2008, 01:36 AM



Theme © iAndrew 2016 - Forum software by © MyBB