Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey Guys, I need help with some Column Permission, I dont understand!

1. I have a Table where 2 of the columns has "column permission" set to Deny for specific user.
2. I have a View that links to this Table.

When the specific user selects from the table, hi gets Permission denied on column, as expected.

BUT! when his calls the View, the 2 columns are shown, without any Permission Denied Error!.

What am I doing wrong here ? Is the Column permission not inherited by the View ?

Best regards
Posted
Comments
Umer Akram 12-Dec-13 7:52am    
Have give the explicit rights for that user against the view as well.
Paw Jershauge 12-Dec-13 11:09am    
Thanks for the reply.

1 solution

When you deny the permissions to Table columns it's only for Table columns. Not views which has been created based on that table.

For example, DBA wants to restrict developers to do changes on a Table. So he deny the permission for that Table & creates a View based on that Table. Now developer can't see anything about Table, instead he could use the View.

Again, DBA wants to show only few columns from View as he don't want to show Log columns like(Created_By, Created_Date, Updated_By, Updated_Date). So he needs to deny permissions for those columns on that View.

So you need to assign things against View too.
DENY Object Permissions (Transact-SQL)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900