Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/kubernetes/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sharepoint 2010中的当前用户和FBA角色_Sharepoint_Sharepoint 2010_Forms Authentication - Fatal编程技术网

Sharepoint 2010中的当前用户和FBA角色

Sharepoint 2010中的当前用户和FBA角色,sharepoint,sharepoint-2010,forms-authentication,Sharepoint,Sharepoint 2010,Forms Authentication,我已使用FBA在Sharepoint 2010中登录FBA用户,并需要知道它具有哪些FBA角色。 SPContext.Current.Web.AllRolesForCurrentUser返回非FBA角色。 如何为当前FBA用户获取FBA角色?我找到了问题的解决方案,非常简单: // Gets a value indicating whether the currently logged-on user is in the specified role System.Web.Security.Ro

我已使用FBA在Sharepoint 2010中登录FBA用户,并需要知道它具有哪些FBA角色。 SPContext.Current.Web.AllRolesForCurrentUser返回非FBA角色。

如何为当前FBA用户获取FBA角色?

我找到了问题的解决方案,非常简单:

// Gets a value indicating whether the currently logged-on user is in the specified role
System.Web.Security.Roles.IsUserInRole("Provider");

我找到了我的问题的解决方案,非常简单:

// Gets a value indicating whether the currently logged-on user is in the specified role
System.Web.Security.Roles.IsUserInRole("Provider");