logins , users, permissions in sql express 2005 , with diagram , flowchart

前端 未结 1 1067
粉色の甜心
粉色の甜心 2021-01-23 09:09

\"enter

I want to create logins & users for my c#.net winforms application which uses

相关标签:
1条回答
  • 2021-01-23 09:50

    I'm changing my whole answer. I really think it's not a good idea to grant uses direct login access to your db. The DB is not the right "choke point" for permissions. Create one user with the total db permissions you will need. Then grant the users features in your application based on their role in the application (tracked in a table in your database).

    There are a lot of problems with creating 1 login per user in your database. A few are 1. Maintainance nightmare 2. Now your users can log in to your db directly if they can get connected to it with Management studio or some other tool.

    1. To elaborate . . . create one login for your application. Name it something like MyApplicationUser.
    2. Create a table in your application to track the roles that each user could be part of. This can also track the features they are allowed to have in your application (though probably in a different table)
    3. When the user starts the application, the application is opend using the same db credentials (MyApplicationUser)
    4. Now you know who the user is (based on NTID, or application login), and you can give them the features that are appropriate to them in the application)
    0 讨论(0)
提交回复
热议问题