Reputation: 195
I used to administer Oracle database but my knowledge of APEX is less than basic. Anyway I decided to create small apps (to make my job even easier) using this software and seems like dynamic menu is one of the last problems I cannot manage. So would you take a minute and explain me how to create in the easiest possible way dynamic menu like below:
HOME
-- page1
-- page2
-- page3
ADMIN
-- apage4
I use three users:
ADMIN with full access to menu
USER1 who sees only Page1 in HOME
USER2 who sees whole HOME
I also created a table called T_PERM which contains info about this grants: USERNAME and ID_OF_FORM which I want to use.
I tried to understand short article from http://davidsgale.com/apex-5-0-how-to-dynamic-menus-universal-theme/
but I cant "convert it" to my scenario :(
Upvotes: 0
Views: 1432
Reputation: 640
I think what you're looking for isn't a 'dynamic' menu in the same context that the article describes. If I understand correctly you want to have one menu with only certain menu items visible to certain users.
To do this, first create authorization schemes for each level you want (so in your case it looks like you will need 3, one for admin and one for each user group). I don't know how you have your security setup currently but the best way IMO to do this is to assign different user roles to each authorization scheme and have a user_roles table which groups a user with a role. You can do this in a simpler manner by simply assigning a username or userid to a specific authorization scheme also, depending on how complicated your app is.
Next create a navigation menu in shared components, and for each menu item assign the appropriate authorization scheme to it (don't forget to do this on page level as well).
Now when you login as each user only the menu items that they are authorized to see will be available to them.
Upvotes: 1