Today I’ve got a new solution about data level authorization. Let me start with the problem case the topic is about.
Users Jack and Andy has a Policy records in the database. One record belongs to Jack and another to Andy. System should allow Jack to make CRUD only on his records, and behave the same way for Andy. This means Andy do not see and is not able to modify Jacks’ records in the database.
Read the rest of this entry »
There are situations when the form should show two select boxes in the parent - child style. For example when in the parent select box user selects country the child select should show cities only of that country.
There are at least two approaches to update child select box:
- load all cities and update contents of child select box by javascript filter;
- load cities from server on each change of country.
While the first one is simple it could be not the optimal solution for big arrays of data. Current tutorial will show how to make the second one with CapePHP.
Inspired by this implementation of menu element for CakePHP I found that I require multilevel menus. It’s nice and can highlight current page. Furthermore it should fit drop down menu css layout. Now I need to show or hide element is there is authenticated user, but later I will need to hide menu items that are disabled by standard acl rules. Read the rest of this entry »