SimpleModule.Permissions
0.0.39
dotnet add package SimpleModule.Permissions --version 0.0.39
NuGet\Install-Package SimpleModule.Permissions -Version 0.0.39
<PackageReference Include="SimpleModule.Permissions" Version="0.0.39" />
<PackageVersion Include="SimpleModule.Permissions" Version="0.0.39" />
<PackageReference Include="SimpleModule.Permissions" />
paket add SimpleModule.Permissions --version 0.0.39
#r "nuget: SimpleModule.Permissions, 0.0.39"
#:package SimpleModule.Permissions@0.0.39
#addin nuget:?package=SimpleModule.Permissions&version=0.0.39
#tool nuget:?package=SimpleModule.Permissions&version=0.0.39
SimpleModule.Permissions
Permission management module for SimpleModule — a modular monolith framework for .NET.
Features
- Role-based access control (RBAC) with database persistence
- Permission seeding for initial setup
- Cross-module authorization via contracts
- Permission assignment to roles
- Fine-grained endpoint authorization
Installation
sm install SimpleModule.Permissions
Or via .NET CLI:
dotnet add package SimpleModule.Permissions
Defining Permissions in Your Own Modules
Any module — including modules you write in a downstream app — can contribute
permissions. Permission classes are auto-discovered by the SimpleModule source
generator: you do not need to call AddPermissions<T>() yourself.
The convention is one sealed class per module implementing IModulePermissions,
containing only public const string fields named Module.Action:
using SimpleModule.Core.Authorization;
namespace MyApp.Customers;
public sealed class CustomersPermissions : IModulePermissions
{
public const string View = "Customers.View";
public const string Create = "Customers.Create";
public const string Update = "Customers.Update";
public const string Delete = "Customers.Delete";
}
Apply them on endpoints using the RequirePermission extension method or the
[RequirePermission] attribute:
public sealed class CreateCustomerEndpoint : IEndpoint
{
public void Map(IEndpointRouteBuilder app) =>
app.MapPost("/", (CreateCustomerRequest request) => /* ... */)
.RequirePermission(CustomersPermissions.Create);
}
The role-edit UI groups permissions by the prefix before the first dot
(Customers.View → "Customers" group), so your custom permissions appear
alongside framework permissions automatically.
If you scaffold modules with sm new module <Name>, a starter
<Name>Permissions.cs is generated for you.
See the Permissions guide for the full authorization model (claims transformation, wildcard matching, testing patterns).
Usage
The module is auto-discovered by the SimpleModule framework. Use
IPermissionsContracts to check permissions from other modules.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FluentValidation (>= 12.1.1)
- FluentValidation.DependencyInjectionExtensions (>= 12.1.1)
- Microsoft.CodeAnalysis.Analyzers (>= 4.14.0)
- Microsoft.CodeAnalysis.CSharp (>= 5.0.0)
- Microsoft.EntityFrameworkCore (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Design (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Sqlite (>= 10.0.3)
- Microsoft.EntityFrameworkCore.Sqlite.NetTopologySuite (>= 10.0.3)
- Microsoft.EntityFrameworkCore.SqlServer (>= 10.0.3)
- Microsoft.EntityFrameworkCore.SqlServer.NetTopologySuite (>= 10.0.3)
- NetTopologySuite (>= 2.6.0)
- Npgsql (>= 10.0.3)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 10.0.0)
- Npgsql.EntityFrameworkCore.PostgreSQL.NetTopologySuite (>= 10.0.0)
- SimpleModule.Core (>= 0.0.39)
- SimpleModule.Database (>= 0.0.39)
- SimpleModule.Permissions.Contracts (>= 0.0.39)
- SimpleModule.Users.Contracts (>= 0.0.39)
- SQLitePCLRaw.bundle_e_sqlite3 (>= 3.0.3)
- SQLitePCLRaw.core (>= 3.0.3)
- SQLitePCLRaw.provider.e_sqlite3 (>= 3.0.3)
- Vogen (>= 8.0.5)
- WolverineFx (>= 5.31.0)
- WolverineFx.EntityFrameworkCore (>= 5.31.0)
- ZiggyCreatures.FusionCache (>= 2.6.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 |
|---|---|---|
| 0.0.39 | 48 | 6/22/2026 |
| 0.0.38 | 89 | 6/3/2026 |
| 0.0.37 | 89 | 6/3/2026 |
| 0.0.36 | 98 | 5/1/2026 |
| 0.0.35 | 97 | 4/30/2026 |
| 0.0.34 | 104 | 4/29/2026 |
| 0.0.33 | 109 | 4/23/2026 |
| 0.0.32 | 117 | 4/23/2026 |
| 0.0.30 | 109 | 4/1/2026 |
| 0.0.29 | 112 | 4/1/2026 |
| 0.0.28 | 107 | 4/1/2026 |
| 0.0.27 | 109 | 3/30/2026 |
| 0.0.26 | 109 | 3/30/2026 |
| 0.0.25 | 105 | 3/30/2026 |
| 0.0.24 | 106 | 3/30/2026 |
| 0.0.23 | 104 | 3/30/2026 |
| 0.0.22 | 106 | 3/30/2026 |
| 0.0.21 | 116 | 3/29/2026 |
| 0.0.20 | 108 | 3/29/2026 |
| 0.0.19 | 110 | 3/29/2026 |