Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Filter data depending on which user is logged in

Richard KApr 13 2017 — edited Apr 13 2017

Dear APEX Community,

I am a seasond Microsoft Access developer and very new to APEX.

What we do in Access is that when the user loads the application, his viewing piviliges are read from a table USERRIGHTS and so-called tempvars (think: session variables) are created for each right they have. The maximum number of rights is 10, so it won't get too complicated.

I can use these TEMPVARS as a parameter in any Access view, making it easy to filter data for each user. e.g. V_PEOPLE only shows people from department A for user Max, but shows people from departments A and B for user Peter.

USERRIGHTS would look like
ID     USER     RIGHT

1     MAX          A

2     PETER     A

3     PETER     B

(simplyfied)

What would be the most elegant way to solve this in APEX?

I learned that APEX stores all session information in tables, which I think is cool. So would it be possilbe to create a view that automatically filters a table according to the APEX user that is accessing it based on his/her corresponding rights in USERRIGHTS?

Thank you!

This post has been answered by Neil Clare on Apr 13 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 11 2017
Added on Apr 13 2017
2 comments
1,247 views