var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: restrict application user with specific data
i am using sql server 2008R2 and i want to restrict my application user to view only the data(ships) related to him only.
We have database and many vessels with many owners, basically wants the owner could only view his owned vessels not the vessel owned by another owner.
Kindly help me with this as this really urgent.
Assuming you've identified the owner in your application you need to pass this as a parameter to your queries.
Something like the following air-code
WHERE EXISTS (
WHERE ship_id = ships.ship_id
AND owner_id = @owner_id
we had done it a little differently in another app, where a client could have many users, but we only want those users to see that client's data.
at logon we would set the sqlid = to the client id
then we had views on our tables and all app programs used views no direct table access. the view looked like:
select all, columns, in, the, table,
where client_id = current sqlid;