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

时间:2012-01-25 10:50:30

标签: sharepoint sharepoint-2010 forms-authentication

我已使用FBA在Sharepoint 2010中记录了FBA用户,并且需要知道它具有哪些FBA角色。 SPContext.Current.Web.AllRolesForCurrentUser 返回非FBA角色。
如何获得当前FBA用户的FBA角色?

1 个答案:

答案 0 :(得分:1)

我找到了解决问题的方法,很简单:

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