I am putting together an admin section to a website. I’m looking for an easy way to build action links based on a users permission level. These links would be the standard view all, edit this, add new and a few custom links relative to each section.
My first thought is to store those links in a database and build thm where the users access level matches. I do this for the main menu, but this is because the menu items really don’t change from section to section. The actions menus in these sections could be different in each section.
I’ve come up with a couple of ideas. Though I’m not sure if they are any good.
1. Store and manage each section menu in a database table and go from there.
2. Do if/then statements in the view and show the links that match the users level for that section
3. Try to do they same thing in option one, but create data arrays in the controller versus using a database.
Does anyone have any suggestions or solutions for this type of thing? I’ve looked into the access control based posts and they seem to more geared towards page restriction and not link restriction. Should I be applying the same principal. Thanks in advance.