Forum Stats

  • 3,851,534 Users
  • 2,263,995 Discussions
  • 7,904,770 Comments

Discussions

Restrict access on login to some users

541824
541824 Member Posts: 19
edited Aug 29, 2008 8:54AM in APEX Discussions
Hi

I'm building an appllication for internal use and i need to restrict access to some users... Is it possible to do that during login, considering that the authentication scheme selected is "Database Account"...?


I thank in advance all your replies!
Tagged:

Best Answer

  • 34441
    34441 Member Posts: 241
    Answer ✓
    Did you set the condition on the Login Process? Because that works fine with me .

    Process: Login
    Type: Exists (SQL query)
    Expression1: select 'x' from dual where :P101_USERNAME not in ('USER1','USER2')

    (might also be something like select 'x' from allowed_users where upper(username) = upper(:P101_USERNAME) )

    DickDral

Answers

  • 34441
    34441 Member Posts: 241
    What do you mean with restrict access:
    1- some users may not enter the system
    2- some users may not use all of the functionality of the system

    DickDral
  • 541824
    541824 Member Posts: 19
    Hi

    I mean some users can't enter the application at all. Deny login...


    Best regards
  • 34441
    34441 Member Posts: 241
    You have several ways to do it.
    Easiest is to set a condition on the login process on the logon page. Here you can exclude users by specifying PL/SQL or SQL, for example:

    :P101_USERNAME not in ('USER1','USER2')

    You could also store the usernames that are allowed access in a table and query this table with a query exist condition.

    good luck, DickDral
  • 541824
    541824 Member Posts: 19
    Hi

    Thank you for your reply.

    I liked your suggestion of setting a condition on the login process on logon page and it's exactly what i want... But it's not working... If i set the condition when the login button is pressed, no one enters the application... If i don't set it that way, all users enter, including the ones on the "exclude list"... I'm using condition type ="SQL Expression".

    What might i be doing wrong?

    Best regards
  • 34441
    34441 Member Posts: 241
    Answer ✓
    Did you set the condition on the Login Process? Because that works fine with me .

    Process: Login
    Type: Exists (SQL query)
    Expression1: select 'x' from dual where :P101_USERNAME not in ('USER1','USER2')

    (might also be something like select 'x' from allowed_users where upper(username) = upper(:P101_USERNAME) )

    DickDral
  • 541824
    541824 Member Posts: 19
    edited Aug 29, 2008 8:54AM
    Hello once again


    Silly me i forgot to upper case the content of username...

    It worked perfectly!

    Thank you so much!!

    Edited by: Allp on Aug 29, 2008 1:54 PM
This discussion has been closed.