dotnet-scaffold-file-authorization-handler

Scaffold a .NET file authorization handler for directory-based access control.

8|1|Updated Feb 5, 2018
One-click install
npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-file-authorization-handler
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dotnet-scaffold-file-authorization-handler
Source: https://github.com/umbrella-libraries/Umbrella/tree/main/.ai-shared/skills/dotnet-scaffold-file-authorization-handler
Command: npx skills add https://github.com/umbrella-libraries/Umbrella --skill dotnet-scaffold-file-authorization-handler

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Scaffolds a dedicated file authorization handler to decouple access control from the file handler in Umbrella's Core.Logic, enabling secure, directory-based permissions.

Core Features & Use Cases

  • Generate an internal sealed class inheriting UmbrellaFileAuthorizationHandler for a specific DirectoryName
  • Bind authorization to UmbrellaFileAuthorizationHandler and register in DI as IUmbrellaFileAuthorizationHandler
  • Ensure safe operation with cancellation checks and input validation in AuthorizeAsync

Quick Start

Scaffold a new <Name>FileAuthorizationHandler and register it with the dependency injection container so it can authorize access in Umbrella's file system.

Frequently Asked Questions about dotnet-scaffold-file-authorization-handler

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

FAQPage Schema
How do I implement directory-based file authorization in .NET?

Directory-based file authorization in .NET is implemented by scaffolding an internal sealed class inheriting UmbrellaFileAuthorizationHandler for a specific DirectoryName, with cancellation checks and validation in AuthorizeAsync. The handler is then registered via dependency injection.

How do I scaffold a file authorization handler and register it with dependency injection?

Scaffolding a file authorization handler generates a sealed class inheriting UmbrellaFileAuthorizationHandler, which you register in the dependency injection container as IUmbrellaFileAuthorizationHandler to authorize file system access.

What does the UmbrellaFileAuthorizationHandler AuthorizeAsync method do?

The AuthorizeAsync method in UmbrellaFileAuthorizationHandler performs cancellation checks, input validation, and safe directory-based authorization logic to decouple access control from the file handler workflow.

Can I use dependency injection to manage file access control in the Umbrella Core.Logic file system?

Yes, dependency injection manages file access control in the Umbrella Core.Logic file system by registering your scaffolded handler as IUmbrellaFileAuthorizationHandler, binding authorization to the directory-specific workflow.

When do I need a dedicated file authorization handler in .NET?

A dedicated file authorization handler is needed when decoupling directory-based access control from file handling logic in Umbrella's Core.Logic, ensuring secure permissions through cancellation checks and input validation.

Why scaffold a dedicated class for file system authorization instead of inline checks?

Scaffolding a dedicated handler decouples access control from the file handler, applying secure directory-based permissions via IUmbrellaFileAuthorizationHandler registration rather than scattering inline authorization checks.