2008-01-07

getting control over cakephp with acl and phpgacl

The last couple of days i was trying to implement acl for a side-project of the agency i’m working for. CakePHP 1.2 helps with the integrated ACL behaviour a lot, but i needed more than this basics to build a usefull usermanagement and user-rights-system. So, and before i started to build my own little plugin, i was looking around and found a cakephp plugin and component for phpgacl. phpgacl has almost all what i was looking for. A ACL breakdown to user, usergroups, controllers/actions and of course, models.

But all good things have a dark side. phpgacl, the core libray, isn’t compatible for newer versions of MySQL (4.x and 5.x). And thats’s because of this known bug .

So, the solution is simple: you have to update the db-schema file (schema.xml) to limit all varchar-fields, that are used to be a primary or index-key, to .. let’s say, down to 160 characters. That’s what i was doing. The next days will tell, if this was right ;)

---

Update (17:22)

A, after i updated the schema and the plugin runs, i see that the much funnier part begins. I knew, that the guys from cakephp done a lot with the form-helper. but now, as i see so .. soooo much warnings about deprecated form-helper-functions, i know that was true *g*.

Home Writing Rides Travel Photos Journal