Search code examples
oracle-apexapex

How to make user see some of navigation menu items?


I have a page to create users. I want, when creating the user, to specify the items that he is entitled to see from the navigation menu, through a list that includes all the navigation menu items

I tried to do that using apex_application_list_entries

anyone can help me?


Solution

  • The way I see it, I don't like your approach.

    Consider authorization.

    • create different roles, such as admin (who will see everything), manager (who will see many things, but not all of them), clerk (who will se only stuff related to their job), etc.
    • every user you create should have one of these roles
    • create a function which accepts e.g. :APP_USER and returns their role
    • create number of authorization schemes (in Apex) which use previously created function
    • in Apex, set "Authorization Scheme" property for each page and navigation menu list entry which will prevent unauthorized access

    Doing so, you won't have to let every user see any particular page itself - authorization will take care about it.

    Mind you: if Apex application has 150 pages, you'll have to pick any number of pages one-by-one for every new user, and there's no guarantee that you'll remember which pages exactly belong to page set which is supposed to be accessed by that user.