【发布时间】:2012-01-25 10:50:29
【问题描述】:
我在 Sharepoint 2010 中使用 FBA 登录了 FBA 用户,并且需要知道它具有哪些 FBA 角色。
SPContext.Current.Web.AllRolesForCurrentUser 返回非 FBA 角色。
如何获取当前 FBA 用户的 FBA 角色?
【问题讨论】:
标签: sharepoint sharepoint-2010 forms-authentication
我在 Sharepoint 2010 中使用 FBA 登录了 FBA 用户,并且需要知道它具有哪些 FBA 角色。
SPContext.Current.Web.AllRolesForCurrentUser 返回非 FBA 角色。
如何获取当前 FBA 用户的 FBA 角色?
【问题讨论】:
标签: sharepoint sharepoint-2010 forms-authentication
我已经为我的问题找到了解决方案,很简单:
// Gets a value indicating whether the currently logged-on user is in the specified role
System.Web.Security.Roles.IsUserInRole("Provider");
【讨论】: