Access Database Security Question

前端 未结 5 1308
野趣味
野趣味 2021-01-26 15:01

I have a database in Access 2003 that I only want certain people to be able to access. In my database I have a table which lists the people that should be able to access the da

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-26 15:39

    Even if you trust the users not to fiddle with their environment variables, please adopt Tony's suggestion anyway. After you add the module he linked, retrieving the user's account name is a simple call to the fOSUserName() function. It's really no more difficult than getting it from the user's environment.

    But I want to add to Tony's point about "easily breaking table driven security". Your plan is to check whether the user is one of your authorized users. My suggestion is to place your back end database file in a location where only your authorized users can get at it. Use Windows file system permissions to keep everyone else out. That way you may decide you don't even need to check your table to determine whether the user is authorized. You could still use the table data to determine whether the user is an Admin or regular user. Or you might decide to keep the authorization check if it gives your managers peace of mind ... even though it doesn't really offer much security.

提交回复
热议问题