Home » Developer & Programmer » Forms » which one have priority-grants defined in forms or database? (forms10g,windows 2000)
which one have priority-grants defined in forms or database? [message #386424] Sat, 14 February 2009 15:07 Go to next message
aviana
Messages: 101
Registered: July 2007
Senior Member
hi,i am confused with how these grants work,please clarify my doubt:
A little background:
In one of our forms in the when-validate-item for an item(its a field in the form, say name) it was defined that only if a user has got a particular role,then only he/she can modify that field.(This is the "super" role.)This used to work.Inside this trigger , it checks the user_role_privs table and see if the user has got this "super" role.If the user is not of "Super\2 role, the trigger fires an exception and says that "You are not allowed to change the name field".
I have got a request which need to satisfy 2 conditions:
I am supposed to change this so that,
1) allow users with a different role to modify this name field.(This is the "Ordinary" role).
2)The flexibility to remove no.1 aboveeded,without modifying the form again,using the database side only.No modification on the form again!

This looked strange to me, as the "ordinary" role has got the update and insert privilege on table "T" but the trigger still fires an exception.
The table corresponding to this form is "T"
Now when I checked the database, the "ordinary" role has assigned the update and insert on table "T" and this role is assigned to the "super" role(so in effect the "super" role can also insert and update on table "T")

Now the real issue:
For no.1)
I had tested the change by modifying the form trigger to check if it is either "Ordinary" or "Super" or even both..whichever be the case, the form allows to update the name field, which is fine,Perfect
For no.2)
I am not able toachieve this-ie, to change it back to whatever it was before wihout changing the form..
I logged in as a user having "super" role
now i revoked the insert and update on table"T" but no effect in the form..it still allows to insert into the name field..when i revoked these privileges, why the form is not complaining that you do not have privileges to update this table?
Please clarify?
Re: which one have priority-grants defined in forms or database? [message #386525 is a reply to message #386424] Mon, 16 February 2009 00:06 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Has the user logged out and logged back into the system?

Test by using two SQL*Plus sessions (one for the user and one for yourself changing the roles) and see if changing the roles for a user has any affect while that user is still logged into the database.

david
Re: which one have priority-grants defined in forms or database? [message #386654 is a reply to message #386525] Mon, 16 February 2009 08:04 Go to previous message
aviana
Messages: 101
Registered: July 2007
Senior Member
hi dj thanks for the reply..
i think this is what went wrong as I did not logged off the user when tested..
now when i revoked the privileges, logged off from the system and tested, it works.
Previous Topic: CONTROL VOLUME IN SOUND ITEM
Next Topic: How to disable specific button in a tabular form
Goto Forum:
  


Current Time: Thu Dec 08 06:08:42 CST 2016

Total time taken to generate the page: 0.10325 seconds