Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
952 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 Reply

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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...