fix(#I13UXU): 角色对用户授权列表按照显示名称排序
#Comment comment #I13UXU #Issue close https://gitee.com/LongbowEnterprise/dashboard/issues?id=I13UXU
This commit is contained in:
parent
fa65b50653
commit
1ef7b65688
|
@ -7,12 +7,11 @@ using Microsoft.AspNetCore.Mvc.Filters;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Policy;
|
|
||||||
|
|
||||||
namespace Bootstrap.Admin.Controllers.Api
|
namespace Bootstrap.Admin.Controllers.Api
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 用户控制器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
[Route("api/[controller]")]
|
||||||
[Authorize]
|
[Authorize]
|
||||||
|
@ -20,7 +19,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
public class UsersController : ControllerBase
|
public class UsersController : ControllerBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 调用获取所有用户信息 用户管理查询按钮
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -31,10 +30,10 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 用户相关授权操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id">主键</param>
|
||||||
/// <param name="type"></param>
|
/// <param name="type">类型 如角色、部门</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost("{id}")]
|
[HttpPost("{id}")]
|
||||||
public IEnumerable<object> Post(string id, [FromQuery]string type)
|
public IEnumerable<object> Post(string id, [FromQuery]string type)
|
||||||
|
@ -49,7 +48,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
p.DisplayName,
|
p.DisplayName,
|
||||||
p.UserName,
|
p.UserName,
|
||||||
p.Checked
|
p.Checked
|
||||||
});
|
}).OrderBy(u => u.DisplayName);
|
||||||
break;
|
break;
|
||||||
case "group":
|
case "group":
|
||||||
ret = UserHelper.RetrievesByGroupId(id);
|
ret = UserHelper.RetrievesByGroupId(id);
|
||||||
|
@ -85,7 +84,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 保存授权操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
/// <param name="values"></param>
|
/// <param name="values"></param>
|
||||||
|
@ -109,7 +108,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// 删除用户操作
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
[HttpDelete]
|
[HttpDelete]
|
||||||
|
@ -120,7 +119,7 @@ namespace Bootstrap.Admin.Controllers.Api
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// api 握手协议
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
|
|
Loading…
Reference in New Issue