| Login screen / security for user roles (merged) [message #204242] |
Sun, 19 November 2006 16:06  |
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 #205161 is a reply to message #204583] |
Thu, 23 November 2006 10:30   |
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   |
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 #205183 is a reply to message #205172] |
Thu, 23 November 2006 17:18   |
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: 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   |
 |
Littlefoot
Messages: 21826 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   |
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: Login screen [message #205389 is a reply to message #205359] |
Fri, 24 November 2006 07:41  |
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
|
|
|
|