2 Replies Latest reply: Jan 2, 2013 6:49 AM by VC RSS

    How to access user information

    Himanshu M-Oracle
      Hi, I am new to Oracle APEX, and have a few questions regarding the user information.
      I've created a new workspace on my local APEX installation, created some users in the workspace, and divided them into roles as "Managers" and "Employees". I am the only Dev and Admin of the workspace, and the users (Managers and Employees) I have created are viewers.

      I'd like to create database tables in the workspace where some field would refer to the user ID of the created user as a foreign key, and their role. Similarly, I'd like to create pages where a particular region is displayed only if the logged in user is a "Manager". How can I access the user data and the role data using SQL?


      I see following tables in my workspace, so which table contains the user information:

      APEX$_ACL
      APEX$_WS_FILES
      APEX$_WS_HISTORY
      APEX$_WS_LINKS
      APEX$_WS_NOTES
      APEX$_WS_ROWS
      APEX$_WS_TAGS
      APEX$_WS_WEBPG_SECTIONS
      APEX$_WS_WEBPG_SECTION_HISTORY
      DEMO_CONSTRAINT_LOOKUP
      DEMO_CUSTOMERS
      DEMO_ORDERS
      DEMO_ORDER_ITEMS
      DEMO_PRODUCT_INFO
      DEMO_STATES
      DEMO_TAGS
      DEMO_TAGS_SUM
      DEMO_TAGS_TYPE_SUM
      DEPT
      EBA_DEMO_LOAD_DEPT
      EBA_DEMO_LOAD_EMP
      EMP
        • 1. Re: How to access user information
          714270
          user783239 wrote:
          Hi, I am new to Oracle APEX, and have a few questions regarding the user information.
          I've created a new workspace on my local APEX installation, created some users in the workspace, and divided them into roles as "Managers" and "Employees". I am the only Dev and Admin of the workspace, and the users (Managers and Employees) I have created are viewers.

          I'd like to create database tables in the workspace where some field would refer to the user ID of the created user as a foreign key, and their role. Similarly, I'd like to create pages where a particular region is displayed only if the logged in user is a "Manager". How can I access the user data and the role data using SQL?
          You can create "Authorization Scheme" based on the roles defined in your table. You can then conditionally render the regions in your pages based on the Authorization Schemes.

          >
          >
          I see following tables in my workspace, so which table contains the user information:

          APEX$_ACL
          APEX$_WS_FILES
          APEX$_WS_HISTORY
          APEX$_WS_LINKS
          APEX$_WS_NOTES
          APEX$_WS_ROWS
          APEX$_WS_TAGS
          APEX$_WS_WEBPG_SECTIONS
          APEX$_WS_WEBPG_SECTION_HISTORY
          DEMO_CONSTRAINT_LOOKUP
          DEMO_CUSTOMERS
          DEMO_ORDERS
          DEMO_ORDER_ITEMS
          DEMO_PRODUCT_INFO
          DEMO_STATES
          DEMO_TAGS
          DEMO_TAGS_SUM
          DEMO_TAGS_TYPE_SUM
          DEPT
          EBA_DEMO_LOAD_DEPT
          EBA_DEMO_LOAD_EMP
          EMP
          You can query the "apex_workspace_apex_users" and "wwv_flow_users" views for apex user details.
          • 2. Re: How to access user information
            VC
            You can reference APP_USER in your authorization scheme and then attach Authorization Scheme to an Application, Page, or Components