Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

implementing Row Level security

Status
Not open for further replies.

mushin

Programmer
Oct 4, 2000
49
I am migrating our databses from a rdbms that includes 'FIND' triggers, fires on access to a table.
SQl does not have such a trigger, so HOW does one
implement any ROW level security or 'on access' methodology.

example:
On select of myTable run a specific stored procedure....

Any Ideas ? [sig][/sig]
 
Just a thought: disallow access to the table, and allow access only through a view. This view would filter out rows for which the user is not authorized. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
What mechanism exist in the View to allow the filtering of
rows when accessed ? [sig][/sig]
 
The WHERE clause.

[tt]create view MyView as
select * from MyTable
where AllowedUser = current_user[/tt]

current_user is a system function. [sig]<p>Robert Bradley<br><a href=mailto: > </a><br><a href= - Visual FoxPro Development</a><br> [/sig]
 
Rob, fine if there is only one or two sets of users, but I wouldn't want to create a view each for loads of users.

Why not so something similar: disallow access to the table and only allow access through a stored procedure that can apply extra row level security rules. [sig]<p> <br><a href=mailto: > </a><br><a href= home</a><br> [/sig]
 
It seems we are getting close to what I need and that is the
ability to redirect access thru a stored procedure so that I may implement my row level security based on data values in my data base. If I disallow access, what event fires that I may trap to run the stored proc ? [sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top