aspnetzero-permission-patterns

Implements permission definitions and authorization patterns for ASP.NET Zero applications.

Updated May 22, 2026
One-click install
npx skills add https://github.com/shakesoft/timekeeper --skill aspnetzero-permission-patterns-shakesoft
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: aspnetzero-permission-patterns
Source: https://github.com/shakesoft/timekeeper/tree/main/.cursor/skills/aspnetzero-permission-patterns
Command: npx skills add https://github.com/shakesoft/timekeeper --skill aspnetzero-permission-patterns-shakesoft

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Adding new permissions in ASP.NET Zero requires coordinated changes across multiple files (constants, provider registration, localization), and missing any step causes authorization failures or missing UI entries. This Skill provides the exact patterns and checklist to add permissions correctly every time. ## Core Features & Use Cases - Three-File Permission Workflow: Guides changes to AppPermissions.cs constants, AppAuthorizationProvider.cs registration, and localization XML files. - Naming Conventions: Enforces the Pages_{Area}{Feature}{Action} constant format and gerund-form localization keys. - Multi-Tenancy & Hierarchy Support: Covers MultiTenancySides.Host/Tenant scoping and parent-child permission hierarchies where granting a parent grants all children. - Use Case: When adding a new Products feature, generate the standard CRUD permission set (view, create, edit, delete), register it under the Pages hierarchy, and apply [AbpAuthorize] attributes to app service methods. ## Quick Start Add a standard CRUD permission set for a new Products feature following the ASP.NET Zero permission patterns.

Frequently Asked Questions about aspnetzero-permission-patterns

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

FAQPage Schema
How do I add a new permission in ASP.NET Zero?▼

Adding a permission in ASP.NET Zero requires three changes: add a constant to AppPermissions.cs in Core.Shared, register it via CreateChildPermission in AppAuthorizationProvider.cs, and add localization keys to the XML file. Then apply [AbpAuthorize] to app service methods.

What is the naming convention for ASP.NET Zero permission constants?▼

Permission constants use the format Pages_{Area}_{Feature}_{Action}, such as Pages_Products_Create, with the string value "Pages.Products.Create". Admin features use Pages_Administration_{Feature}_{Action}, and localization keys use gerund forms like "CreatingNewProduct".

How do I restrict a permission to host or tenant in ASP.NET Zero?▼

Pass the multiTenancySides parameter when registering the permission: MultiTenancySides.Host for host-only, MultiTenancySides.Tenant for tenant-only. Omitting the parameter makes the permission available to both sides by default.

Does granting a parent permission grant child permissions in ASP.NET Zero?▼

Yes, permissions in ASP.NET Zero are hierarchical. Granting a parent permission like Pages_Products automatically grants all child permissions such as Pages_Products_Create, Edit, and Delete.

Can I require multiple permissions on one app service method?▼

Yes, pass multiple permission names to [AbpAuthorize], such as [AbpAuthorize(AppPermissions.Pages_Products_Create, AppPermissions.Pages_Products_Edit)]. Access is granted if the user has any one of the listed permissions.