Sunday, February 12, 2012

Administrating content with integrated security?

I have a two tier application with a .net client that access data from a SQL
Server. Depending on what windows user group the user belong to I want them
to get different data. The solution I would like to have is one where a could
change only in the database and nothing in the client and still get different
users to get different data.
There is only one table that should differ for different the users. One
solution would therefore be to overload the table, i.e. create one table for
each user all with the same name but with different owners. Because the
client doesn't explicitly state the owner of the object it would get the
table owned by the user running the client.
This solution would lead to far to many identical copies of the table and
for each new user at the company you would have to create a new table on the
server. A better solution would be if it were possible to connect tables to
server roles and if the client would get access the table that is connected
to the server role that the user belongs to. To me, it seems this solution is
not possible because SQL Server will identify the table with the user and
never try with the role.
Regards,
Joeluse a trigger or a view on the table to match the user with a column to
select only the rows that pertain to them (current_user)
"Joel" <Joel@.discussions.microsoft.com> wrote in message
news:64B7A8C1-FF4A-4CF4-B3B7-8BE713D61E68@.microsoft.com...
>I have a two tier application with a .net client that access data from a
>SQL
> Server. Depending on what windows user group the user belong to I want
> them
> to get different data. The solution I would like to have is one where a
> could
> change only in the database and nothing in the client and still get
> different
> users to get different data.
> There is only one table that should differ for different the users. One
> solution would therefore be to overload the table, i.e. create one table
> for
> each user all with the same name but with different owners. Because the
> client doesn't explicitly state the owner of the object it would get the
> table owned by the user running the client.
> This solution would lead to far to many identical copies of the table and
> for each new user at the company you would have to create a new table on
> the
> server. A better solution would be if it were possible to connect tables
> to
> server roles and if the client would get access the table that is
> connected
> to the server role that the user belongs to. To me, it seems this solution
> is
> not possible because SQL Server will identify the table with the user and
> never try with the role.
> Regards,
> Joel

No comments:

Post a Comment