Sunday, March 25, 2012

Access controlon line level

Is it possible to implement control access on the line level usning standard
features?
I had to implement several tables User, groupe, article ..., map users to
groups and articles as well as some Sps in order that users or group of user
s
acces articles they are allowed to diplay.
I would highly appreciate any help
Thanks"SalamElias" <eliassal@.online.nospam> wrote in message
news:644C3FAF-8D72-4EF4-847F-82E96B13ADD8@.microsoft.com...
> Is it possible to implement control access on the line level usning
> standard
> features?
> I had to implement several tables User, groupe, article ..., map users to
> groups and articles as well as some Sps in order that users or group of
> users
> acces articles they are allowed to diplay.
> I would highly appreciate any help
> Thanks
>
Not sure what you mean by "line level". If you mean on a per-row level,
then yes it is.
Especially if you use stored procs.
I'd keep a table of users and values. Each row would have a corresponding
value.
Do all DML work through a stored proc. So if you want a user to view data,
the stored proc would look at their credentials and as part of the WHERE
clause would select only rows that meet that set of credentials (plus any
others required for that specific query.)
It's also possible to do this via views if you want.
Greg Moore
SQL Server DBA Consulting
sql (at) greenms.com http://www.greenms.com|||"SalamElias" <eliassal@.online.nospam> wrote in message
news:644C3FAF-8D72-4EF4-847F-82E96B13ADD8@.microsoft.com...
> Is it possible to implement control access on the line level usning
> standard
> features?
> I had to implement several tables User, groupe, article ..., map users to
> groups and articles as well as some Sps in order that users or group of
> users
> acces articles they are allowed to diplay.
> I would highly appreciate any help
> Thanks
>
I think your question is about row-level security. Use stored procedures and
views to limit the rows that individual users can access.
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--

No comments:

Post a Comment