Home » Developer & Programmer » Forms » Login screen / security for user roles (merged)
Login screen / security for user roles (merged) [message #204242] Sun, 19 November 2006 16:06 Go to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hello there,

I want to ask how do i declear the username and password for couple of forms say 1,2,3,4 and three user roals: manager, Head staff, normal staff in oracle form??

i dont know how i can do it via the oracle form..do i creat it in the switch board under somthing??

Please if u have some ideas please let me know!!!!

Thank you
Re: How do i create securtiy for user roles in oracle forms? [message #204427 is a reply to message #204242] Mon, 20 November 2006 11:09 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Users, their passwords and roles are created on database level.

You'd then grant some privileges to roles, and later grant roles to users. Oracle Forms would require users to enter their usernames, passwords and database aliases in order to start using them.
Re: How do i create securtiy for user roles in oracle forms? [message #204449 is a reply to message #204427] Mon, 20 November 2006 16:52 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hi there,

Does this mean that i create the user password and roles in SQL PLUS and if so how can i make this show in oracle form???? will it happen automatically or do i need to create a trigger or procedure or something else in oracle form???
Re: How do i create securtiy for user roles in oracle forms? [message #204583 is a reply to message #204449] Tue, 21 November 2006 05:57 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Form is front-end. Database is back-end.

Users use front-end (forms) to connect to back-end (database).
They connect to the database by issuing required credentials: their usernames and passwords.

So, when you create a user, that's all what a manager or any other user needs to connect to the database and use its resources accordingly to privileges granted to him/her.
Re: How do i create securtiy for user roles in oracle forms? [message #205161 is a reply to message #204583] Thu, 23 November 2006 10:30 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hi i am trying to create a log in screen IN ORACLE FORM and i come up with this basic codeing :

DECLARE

user_id VARCHAR2 (20);
user_Passowrd Varchar2 (10);

BEGIN
IF
user_id = 'm252' AND user_Passowrd = 'cookie'
THEN
call_form ('X:\Project Final\PRODUCT');


ELSIF user_id = 's254' AND user_Passowrd = 'apple'

THEN

call_form ('X:\Project Final\PRODUCT');

END IF;
END;

and the foundation of it all is

create table User_log
( user_id VARCHAR2 (20),
user_Passowrd Varchar2 (10));

i dont know where to put it under a when_ mouse_click trigger
or in the program unit as a procedure.

Does anyone has any idea how this could be possible!!!!!!!!!!!!!

[Updated on: Thu, 23 November 2006 10:51]

Report message to a moderator

Login screen [message #205164 is a reply to message #204242] Thu, 23 November 2006 11:29 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
I want to call a login form. (which have 2 fields & 1 push_button
like
use_name
password
a button login
(At log_on trigger I just put null; statement)

and now i want that when I put login button then oracle will connect database.

because on this basic my menumodule security (through Role) will work.

to achive this goal what I do.



Re: How do i create securtiy for user roles in oracle forms? [message #205172 is a reply to message #205161] Thu, 23 November 2006 13:41 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
(Aside the way you did it,) create a button on the form and put this code into the WHEN-BUTTON-PRESSED trigger.
Re: How do i create securtiy for user roles in oracle forms? [message #205183 is a reply to message #205172] Thu, 23 November 2006 17:18 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
hi there, i did do that aswell but it did not work and another thing i dont get why i have to declare userid and user password even though i created a table.

is there any other way i could do it because the button function don't work even though it does compile successfully.

thanks
Re: Login screen [message #205190 is a reply to message #205164] Thu, 23 November 2006 18:05 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have a look at http://www.orafaq.com/forum/m/87278/67467/?srch=logon+user+pass#msg_87278

David
Re: How do i create securtiy for user roles in oracle forms? [message #205230 is a reply to message #205183] Fri, 24 November 2006 00:36 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As I've said, aside the way you did it, I *think* that your approach isn't right: you are trying to connect to Oracle database. Right? User-defined table (the one you created) has nothing to do with it. When connecting to Oracle, you have to provide valid credentials: username, its password and database alias. Oracle takes care about it, it is not you who should code this part of the application.

In SQL*Menu (older Oracle tool; I *think* it doesn't exist any more, but the same functionality is achieved through Forms Developer) you created a menu. Every form, report, whatever in this menu could be granted certain role - one or more of them. Doing so, when user connected to your application, it were roles which enabled him/her to use (or not to use, even see) particular menu entry.

Once again: the way I understood your problem, do not code this Oracle functionality.
Re: Login screen [message #205359 is a reply to message #205190] Fri, 24 November 2006 06:02 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hiya, yeah the link is useful however i cant create any user roles or anything like that because am using the application oracle 10g from the office network and it gives me this message ORA-01031: insufficient privileges when i try to create one. for this simple reason only i created a user_id and user_password table where i put the following data USER_ID = M252, S251 USER_PASSWORD = COOKIE, APPLE.

I tryed to do put an if statement in when_button_pressed trigger but it doesnt work.

the following is the coding even though it does complie but its not the right way!!

Declear

USER_ID VARCHAR2 (20);
USER_PASSOWRD Varchar2 (10);

BEGIN
IF
USER_ID = 'm252' AND USER_PASSOWRD = 'cookie'
THEN
call_form ('X:\Project Final\PRODUCT');

ELSIF USER_ID = 's251' AND USER_PASSOWRD = 'apple'

THEN call_form ('X:\Project Final\PRODUCT');

END IF;
END;

but it don't work and i cant create no user role or anything like that so erm any ideas???

[Updated on: Fri, 24 November 2006 17:24]

Report message to a moderator

Re: How do i create securtiy for user roles in oracle forms? [message #205362 is a reply to message #205230] Fri, 24 November 2006 06:09 Go to previous messageGo to next message
ghostly
Messages: 17
Registered: November 2006
Location: UK
Junior Member
Hey, i cant do that am not allowed to define roles and set privileges..thats why iam thinking of other ways to get around it.

Thank anyway

[Updated on: Fri, 24 November 2006 06:10]

Report message to a moderator

Re: Login screen [message #205389 is a reply to message #205359] Fri, 24 November 2006 07:41 Go to previous message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
Hi,

In your form you create two text items one for username: and another for password: .

You create two Push Buttons in the form : 1) Login 2)Exit

In the 'login' button attach your pl/sql code in
When-button-pressed triger

It will work.

Bye
Ashu
Previous Topic: How to include a packge into built-in packages of form (merged)
Next Topic: Upgrade from developer 6i to developer 9i
Goto Forum:
  


Current Time: Fri Dec 09 22:56:43 CST 2016

Total time taken to generate the page: 0.29711 seconds