Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 2
    This design would only allow each MenuItem to be tied to a single UserGroup, meaning either limited menus or data duplication. In reality you want a link table, ideally. Also, your choice of DB table naming as plurals makes me sad ;) Commented Jul 29, 2013 at 13:52
  • @EdWoodcock oh very good point. I should have gone with a permission level (int) and then compared that to the user's group level. I'll change that. Note, plural names habit caused by my use of CakePHP. Which is strange, cause the framework uses singular aliases for tables in queries. Commented Jul 29, 2013 at 13:56
  • @MatthewFoscarini No worries, I'm not really bothered as long as a codebase is consistent ;) Commented Jul 29, 2013 at 14:01
  • 1
    Awesome answer. I will keep this in mind next time I do something likt this. For now I think user61852 solution will suit best since it doesn't require as many changes to the existing code. Thanks! Commented Jul 29, 2013 at 14:06