IBA.ECL.PermissionValidation
1.0.0
See the version list below for details.
dotnet add package IBA.ECL.PermissionValidation --version 1.0.0
NuGet\Install-Package IBA.ECL.PermissionValidation -Version 1.0.0
<PackageReference Include="IBA.ECL.PermissionValidation" Version="1.0.0" />
paket add IBA.ECL.PermissionValidation --version 1.0.0
#r "nuget: IBA.ECL.PermissionValidation, 1.0.0"
// Install IBA.ECL.PermissionValidation as a Cake Addin #addin nuget:?package=IBA.ECL.PermissionValidation&version=1.0.0 // Install IBA.ECL.PermissionValidation as a Cake Tool #tool nuget:?package=IBA.ECL.PermissionValidation&version=1.0.0
Usage
1. Add settings
Add all required points of the settings to appsettings.config:
"PermissionValidationOptions": {
"DataSourceDbConnectionString": "connection_string_to_database"
}
Register the settings object:
public void ConfigureServices(IServiceCollection services)
{
services.AddSingleton<IPermissionValidationOptions>(Configuration.GetSection("PermissionValidationOptions").Get<PermissionValidationOptions>());
2. Apply "RequiredPermissionsAttribute" to the action you need protect
Apply the attribute and specify all permissions you need to check
[RequiredPermissions(PermissionCode.ViewCommonInformation)]
public IEnumerable<string> SomeAction(Guid requestedId)
IMPORTANT
If the method to which you are applying the attribute is performed as INTERACTION with someone's resources then it HAD TO have parameter "requestedId" - ones will specify the user, whose resource are being extracted. If the parameter is not specified the request is regarded as request to perform the method just as action therefore the permissions will be validated accordingly.
Support
If you found a bug or have a feature suggestion, please contact with to ECL Team
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. |
.NET Core | netcoreapp2.0 is compatible. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
-
.NETCoreApp 2.0
- Microsoft.AspNetCore.Http (>= 2.0.2)
- Microsoft.AspNetCore.Mvc (>= 2.0.3)
- Microsoft.IdentityModel.Tokens (>= 5.2.1)
- Npgsql.EntityFrameworkCore.PostgreSQL (>= 2.0.1)
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.16 | 1,599 | 11/26/2019 |
1.0.15 | 1,189 | 11/20/2019 |
1.0.14 | 1,270 | 10/2/2019 |
1.0.13 | 1,465 | 4/24/2019 |
1.0.11 | 1,261 | 4/19/2019 |
1.0.10 | 1,343 | 4/4/2019 |
1.0.9 | 1,848 | 10/31/2018 |
1.0.8 | 2,079 | 7/19/2018 |
1.0.7 | 1,612 | 7/7/2018 |
1.0.6 | 1,568 | 7/7/2018 |
1.0.5 | 1,678 | 6/19/2018 |
1.0.4 | 1,567 | 6/7/2018 |
1.0.3 | 1,646 | 5/28/2018 |
1.0.2 | 1,658 | 5/28/2018 |
1.0.1 | 1,944 | 4/12/2018 |
1.0.0 | 1,676 | 4/12/2018 |
Release 1.0.0.0