更改RoleHelper.RetrieveRolesByUrl方法名
This commit is contained in:
parent
a69d75e731
commit
849b5dae7a
|
@ -31,7 +31,7 @@ namespace Bootstrap.Admin
|
||||||
protected override bool AuthenticateRole()
|
protected override bool AuthenticateRole()
|
||||||
{
|
{
|
||||||
string url = string.Format("~/{0}/{1}", ControllerName, ActionName);
|
string url = string.Format("~/{0}/{1}", ControllerName, ActionName);
|
||||||
Roles = string.Join(";", RoleHelper.RetrieveRolesByURL(url).Select(r => r.RoleName));
|
Roles = string.Join(";", RoleHelper.RetrieveRolesByUrl(url).Select(r => r.RoleName));
|
||||||
return base.AuthenticateRole();
|
return base.AuthenticateRole();
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -396,7 +396,7 @@ namespace Bootstrap.DataAccess
|
||||||
/// 从Navigators-〉GroupNavigatorRole-〉Role查查询某个用户所拥有的角色
|
/// 从Navigators-〉GroupNavigatorRole-〉Role查查询某个用户所拥有的角色
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static IEnumerable<Role> RetrieveRolesByURL(string url)
|
public static IEnumerable<Role> RetrieveRolesByUrl(string url)
|
||||||
{
|
{
|
||||||
string key = string.Format("{0}{1}", RoleDataKey, url);
|
string key = string.Format("{0}{1}", RoleDataKey, url);
|
||||||
return CacheManager.GetOrAdd(key, CacheSection.RetrieveIntervalByKey(RoleDataKey), k =>
|
return CacheManager.GetOrAdd(key, CacheSection.RetrieveIntervalByKey(RoleDataKey), k =>
|
||||||
|
|
Loading…
Reference in New Issue