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,598 | 11/26/2019 |
1.0.15 | 1,188 | 11/20/2019 |
1.0.14 | 1,269 | 10/2/2019 |
1.0.13 | 1,464 | 4/24/2019 |
1.0.11 | 1,260 | 4/19/2019 |
1.0.10 | 1,342 | 4/4/2019 |
1.0.9 | 1,847 | 10/31/2018 |
1.0.8 | 2,078 | 7/19/2018 |
1.0.7 | 1,611 | 7/7/2018 |
1.0.6 | 1,567 | 7/7/2018 |
1.0.5 | 1,677 | 6/19/2018 |
1.0.4 | 1,566 | 6/7/2018 |
1.0.3 | 1,645 | 5/28/2018 |
1.0.2 | 1,657 | 5/28/2018 |
1.0.1 | 1,943 | 4/12/2018 |
1.0.0 | 1,675 | 4/12/2018 |
Release 1.0.0.0