AspNetCore.Identity.ByPermissions 1.1.16

System to abstract the job ob create permissions based on claims, for more info, check the example in https://github.com/JorTurFer/AspNetCore.Identity.ByPermissions

Install-Package AspNetCore.Identity.ByPermissions -Version 1.1.16
dotnet add package AspNetCore.Identity.ByPermissions --version 1.1.16
<PackageReference Include="AspNetCore.Identity.ByPermissions" Version="1.1.16" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspNetCore.Identity.ByPermissions --version 1.1.16
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

AspNetCore.Identity.ByPermissions

Description

This system provides a abstraction layer of the claims system, registering the claims as attributes.The Identity framework manages the access checks and the system store the different permissions in a collection in order to access them in a manager page. This does easier the work of manage the access becouse once the manage zone is written, it's only necesary add attributes.

Information in build

Soon I am going to write the documentation, sorry (The next info is not complete)...

  1. Register the "Permissions Service"
public void ConfigureServices(IServiceCollection services)
{
  ....
  services.AddAuthorization(options =>
  {
      options.AddPermissions(new PermissionService());
  });
  ....
}
  1. Add the Permissions in the "Controllers" and "Actions"
//[AttributePermission("Permission Name","Description")]
[Permission("Home",  "Can access to Home Controller")]
public class HomeController : Controller
{
  public IActionResult Index()
  {
    return View();
  }
  //This line add a Permissions named "About" with a description and assigned to the action
  [Permission("About",  "Can see about page")]
  public IActionResult About()
  {
    ViewData["Message"] = "Your application description page.";
    return View();
  }
}

AspNetCore.Identity.ByPermissions

Description

This system provides a abstraction layer of the claims system, registering the claims as attributes.The Identity framework manages the access checks and the system store the different permissions in a collection in order to access them in a manager page. This does easier the work of manage the access becouse once the manage zone is written, it's only necesary add attributes.

Information in build

Soon I am going to write the documentation, sorry (The next info is not complete)...

  1. Register the "Permissions Service"
public void ConfigureServices(IServiceCollection services)
{
  ....
  services.AddAuthorization(options =>
  {
      options.AddPermissions(new PermissionService());
  });
  ....
}
  1. Add the Permissions in the "Controllers" and "Actions"
//[AttributePermission("Permission Name","Description")]
[Permission("Home",  "Can access to Home Controller")]
public class HomeController : Controller
{
  public IActionResult Index()
  {
    return View();
  }
  //This line add a Permissions named "About" with a description and assigned to the action
  [Permission("About",  "Can see about page")]
  public IActionResult About()
  {
    ViewData["Message"] = "Your application description page.";
    return View();
  }
}

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.1.16 318 8/26/2018
1.1.2 230 8/9/2018
1.0.0 193 8/9/2018