abp-authorization

Manage authorization and permissions in ABP.NET applications.

14.4k|3.7k|Updated Dec 3, 2016
One-click install
npx skills add https://github.com/abpframework/abp --skill abp-authorization
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: abp-authorization
Source: https://github.com/abpframework/abp/tree/main/.claude/skills/abp-authorization
Command: npx skills add https://github.com/abpframework/abp --skill abp-authorization

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill simplifies the management of permissions, roles, and access control within ABP.NET applications, ensuring that users only have access to the resources they are authorized to use.

Core Features & Use Cases

  • Permission Definition: Define granular permissions for different features and modules.
  • Declarative Authorization: Apply authorization rules using attributes on application services.
  • Programmatic Checks: Dynamically check user permissions within application logic.
  • Multi-Tenancy Support: Configure permissions specific to host or tenant sides.
  • Use Case: Securely restrict access to sensitive data by defining permissions for viewing, creating, editing, and deleting specific entities, and then applying these permissions to user roles.

Quick Start

Use the abp-authorization skill to define a new permission named 'Books.Create' within the 'BookStore' group.

Frequently Asked Questions about abp-authorization

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define permissions in an ABP framework application?

You apply declarative authorization in ABP by adding the [Authorize] attribute to application services. This restricts access to specific endpoints by enforcing predefined permission policies before the service method executes.

How do I check user permissions programmatically in ASP.NET Core with ABP?

You check permissions programmatically in ABP by using CheckPolicyAsync or IsGrantedAsync within your application logic. These methods verify access against the ICurrentUser and IPermissionManager interfaces dynamically during runtime.

Does ABP authorization support multi-tenancy for access control?

Yes, ABP authorization supports multi-tenancy access control. You can configure granular permissions specific to either the host side or individual tenant sides, ensuring isolated and appropriate resource access across tenants.

What is the best way to manage roles and access control in ABP.NET?

The best way to manage access control in ABP.NET is defining permissions for viewing, creating, editing, and deleting entities, then applying these permissions to user roles. This restricts access to sensitive data effectively.

Why use ICurrentUser for programmatic permission checks in ABP?

Using ICurrentUser for programmatic permission checks in ABP securely identifies the active user context. Combined with IPermissionManager, it dynamically evaluates access rights and enforces granular authorization rules within your logic.