FancyPrairie
Programmer
I'm trying to manage several databases. So, I need to know if the currentuser is a member of the Admins group of a given database.
For example, the user is running code in database A. I need to know if the currentuser is a member of the Admins group in database B.
The reason for this is that I have some system tables in a library database (tblPC) which define, for example, all of the computers that run database B. And all of the computers that run database C, and so on. I only want users that belong to the Admins group of database B to be able to edit the records in tblPC that that are assigned to database B. (Note that this user could have developed databases B,C, and E and, therefore, is the Administrator or those database. Consequently, the user can modify the records in tblPC for databases B, C, and E. But, since this user did not develop database D, the user is not a member of D's Admins group and, therefore, can not modify the records in tblPC for database D).
So, again my question is, how can I determine if a user is a member of the Admins group within another database?
For example, the user is running code in database A. I need to know if the currentuser is a member of the Admins group in database B.
The reason for this is that I have some system tables in a library database (tblPC) which define, for example, all of the computers that run database B. And all of the computers that run database C, and so on. I only want users that belong to the Admins group of database B to be able to edit the records in tblPC that that are assigned to database B. (Note that this user could have developed databases B,C, and E and, therefore, is the Administrator or those database. Consequently, the user can modify the records in tblPC for databases B, C, and E. But, since this user did not develop database D, the user is not a member of D's Admins group and, therefore, can not modify the records in tblPC for database D).
So, again my question is, how can I determine if a user is a member of the Admins group within another database?