×
Security

Little known Row Level Security hook

By Larry Grey • May 18, 2006

In my previous posting on passing parameters to nVision, I briefly mentioned something that was unknown to one of the other experts here at Grey Sparling (and if he didn’t know about it, then probably not many other people do as well). Therefore, it warrants its own posting.

Although you can use the query security record to perform data security, you can also accomplish this by adding OPRID, OPRCLASS, or ROWSECCLASS as a key field (but not list box field) in the record definition.

Here’s an example of how it works (both with and without security applied).

With Security
In a financials database, there is a view called SP_PROJ_OPRVIEW, which is intended to allow security at the project level for individual users. The delivered record definition has the following settings for the OPRID field:


f2

Now, if you were to use this record in PS/Query, you would get the following SQL:

SELECT
FROM PS_SP_PROJ_OPRVW A
WHERE A.OPRID = 'VP1'


Without Security

Here’s the same record, with the OPRID key set as a list box item (which turns off row level security for it)

f2

The SQL coming from query would then be as follows:


SELECT FROM PS_SP_PROJ_OPRVW A

Labels:

Stay Updated

Request a Demo