IBA.ECL.PermissionValidation 1.0.0

There is a newer version of this package available.
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                
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="IBA.ECL.PermissionValidation" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add IBA.ECL.PermissionValidation --version 1.0.0                
#r "nuget: IBA.ECL.PermissionValidation, 1.0.0"                
#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 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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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