Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
943 views
in Technique[技术] by (71.8m points)

mod rewrite - Authorization scheme based on page item value in Oracle Apex

I have a page as under:

image

What I want to do is: each user can see its own staff page

When customer click on the link "Create" in Staff Column, it shows the staff page. I want to add authorization to check if the user already login in the system is the same one who is on the row of link "Create" then Give access to staff page.

For example:

  • if the user login is "Joanne" then he can see the staff page of itself.
  • if the user is someone else and click on the "Create" link in the row of Joanne then it doesn't access to user to go to the staff page.

It means each user can see its own staff page. I don't know how to access the page items in the Shared Components/Authorization Schemes.

Please help

Thanks Mali


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If table (which is source of that report) contains username everyone uses to log on to the application (for example, JATKINS for Joanne), then you could display/hide "Create" link in the query. For example:

select id,
       first_name,
       family_name,
       --
       case when username = :APP_USER then 'Create'
            else null
       end create_link
from the_table 

It means that everyone sees the "Create" link only by their own name.

create_link column's type would be "Link" and you'd set it to navigate to another page, passing the ID (or whichever info you pass).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...