Toosame 1.0.1
dotnet add package Toosame --version 1.0.1
NuGet\Install-Package Toosame -Version 1.0.1
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Toosame" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Toosame --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Toosame, 1.0.1"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Toosame as a Cake Addin #addin nuget:?package=Toosame&version=1.0.1 // Install Toosame as a Cake Tool #tool nuget:?package=Toosame&version=1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Toosame.ManagementKit
/// <summary>
/// 系统菜单管理
/// </summary>
[ApiController]
[Route("api/System/[controller]")]
[MenuPath("/系统管理/菜单管理")]
public class MenuController : ControllerBase
{
private readonly IHttpContextAccessor _httpContextAccessor;
private readonly MenuPermissionManager _menuPermissionManager;
public MenuController(IHttpContextAccessor httpContextAccessor,
MenuPermissionManager menuPermissionManager)
{
_httpContextAccessor = httpContextAccessor;
_menuPermissionManager = menuPermissionManager;
}
/// <summary>
/// 获取系统菜单和权限树数据
/// </summary>
/// <returns></returns>
[HttpGet, MenuAuditName("获取系统菜单和权限树")]
public ActionResult<IEnumerable<MenuPermissonTreeNode>> Get()
{
return _menuPermissionManager.MenuPermissonTree.ToList();
}
/// <summary>
/// 根据用户获取菜单列表
/// </summary>
/// <returns></returns>
[HttpGet("User"), MenuAuditName("获取当前登录用户菜单树")]
public ActionResult<IEnumerable<MenuPermissonTreeNode>> GetUserMenu()
{
string[] permission = _httpContextAccessor.HttpContext.User
.FindAll(p => p.Type == nameof(MenuPermissonKind.Permisson))
.Select(p => p.Value)
.ToArray();
if (!permission.Any())
return Forbid();
return _menuPermissionManager.GetTree(permission);
}
}
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- Microsoft.AspNetCore.Authorization (>= 6.0.6)
- Microsoft.AspNetCore.Identity.EntityFrameworkCore (>= 6.0.6)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.Extensions.Identity.Stores (>= 6.0.6)
- Microsoft.IdentityModel.Tokens (>= 6.20.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.0.1 | 260 | 7/1/2022 |