Reputation: 3130
I have an application where I have a group of users. They use the app UI to view different information within a database. However, there are some information that some users are not allowed to see. So, I was thinking that I could create groups and add the allowed users to these groups. I read about roles in Sql server, but it seems to me that I need to create a login for each user. But, in my app I connect to the database using sa and when the user logins, the app checks the password+username in a "Users" table within the database. So, is there any way I could create these permissions?
Upvotes: 1
Views: 147
Reputation: 5048
Assuming windows login, I would create groups in AD, assign those groups as users with logins in sql server and use the groups to determine who has access to what. You could also check their job title in AD and allow permission in your app based on that
Failing that, you could have an exclusion list that is checked. By that I mean having a table of users with elevated access and checking against the list of names to allow access to certain tables. Not ideal as you have to do per user stuff, if this is the only way though, delegate - give someone else a front end and permission to grant access.
Upvotes: 1