检查当前PWA用户的安全组成员身份 [英] Check current PWA user's security group membership
问题描述
我想使用WCF技术检查当前PWA用户在自定义对话框中的成员资格。
- 我可以通过以下方法确定当前的PWA用户标识符使用ResourceClient.GetCurrentUserUid()方法
- 我知道组标识符,因为 是"硬编码的",例如,Administrators = 69fc9d0d-0b5f-4f4a-a9ef-c05a60eb5236
为了列出用户的组,我尝试使用ResourceClient.ReadResourceAuthorization()方法,但是在GeneralSecurityAccessDenied中失败了。我认为,因为当前用户没有ManageUsersAndGroups权限。
所以我的问题是我如何确定当前的PWA用户安全组列表或检查成员身份状态而没有任何"额外"权限。许可吗?
非常感谢任何建议,
Andrá s
我会使用具有正确权限的服务帐户调用Resource PSI。
您可以直接在对象上定义凭据:
< pre lang ="xc#"> ResourceClient.ClientCredentials.Windows.ClientCredential.UserName =" login" ;;
ResourceClient.ClientCredentials.Windows.ClientCredential.Password =" pwd" ;;
ResourceClient.ClientCredentials.Windows.ClientCredential.Domain =" domain";
I would like check the current PWA user's membership in custom dialog by using WCF technology.
- I can determine the current PWA user identifier by using ResourceClient.GetCurrentUserUid() method
- I know the group identifier, because is "hard-coded", for example, Administrators = 69fc9d0d-0b5f-4f4a-a9ef-c05a60eb5236
To list user's groups I try to use ResourceClient.ReadResourceAuthorization() method, but it failed with GeneralSecurityAccessDenied. I think, because the current user don't have ManageUsersAndGroups permissions.
So my question is how I can determine the current PWA user security group list or check membership status without any "extra" permission?
Many thanks to any advice,
András
I would call the Resource PSI with a service account who has the right permissions.
You can define the credentials directly on your object :
ResourceClient.ClientCredentials.Windows.ClientCredential.UserName = "login"; ResourceClient.ClientCredentials.Windows.ClientCredential.Password = "pwd"; ResourceClient.ClientCredentials.Windows.ClientCredential.Domain = "domain";
这篇关于检查当前PWA用户的安全组成员身份的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!