Bryan Agee
Bryan Agee

Reputation: 5052

Open source ORM with access control for PHP

I have a number of projects (some commercial, some not) in which both field- and resource-level access are needed. Naturally, it would be nice to use and contribute to an ORM project rather that re-inventing the wheel, but I've not been able to find a project with any kind of access control layer; it seems most of them leave that up to the domain objects, and those classes cannot inherit from a super class.

It may be possible to fork Doctrine--but again, I'd prefer not to dive in solo.

Upvotes: 1

Views: 456

Answers (2)

Maxime Pacary
Maxime Pacary

Reputation: 23041

Creating a DB structure for user access control, and building the code that will make the defined rules effective, is not the ORM job (it will help you to do it, but it won't do it for you).

However this need of access control is frequent (named ACL or RBAC; it seems that you're looking for an ACL), and some projects have already emerged, which create all the DB structure for that, for example sfGuard (Symfony) or Zend_ACL (Zend Framework).

Check those SO threads too:

Upvotes: 1

David Conde
David Conde

Reputation: 4637

My choice as ORM has always been Propel (v1.5), I find it lighter, faster and easier to understand. It also has custom behaviors, which could be the starting phase of your access control plugin, at least for resources.

You can see some docs on behaviors here, and this wiki explains pretty well how to build your own.

Hope I can help

Upvotes: 1

Related Questions