Security Policy has problem while insertion, Row level; Security

Hi Experts,

I have created Security policy and has FILETR PREDICATES, I have bound this with table XX this table has security column called System user. Its like the login user can see only his data from that table. Its working fine for the Update, delete, select, but in case of insert I found -- If no record is there for that user then its working fine . but if that user related data is already there then  its allowing to insert  another user data also.  for example If I login as User1 I am able to insert: insert into XX (id , SystemUser) values(1,'User2'), that should not.

Thanks in advance... 

September 4th, 2015 11:28am

Hi Vikas

Try Setting Default values for SystemUser column as 

ALTER TABLE YourTable ADD CONSTRAINT DF_YourTable DEFAULT USER FOR SystemUser

Then write an trigger on SystemUser column which will check and  roles back any inappropriate entry.

More details: https://msdn.microsoft.com/en-IN/library/ms189799.aspx

Free Windows Admin Tool Kit Click here and download it now
September 7th, 2015 2:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics