webiny-admin-security-catalog

Catalogs Webiny admin security abstractions for authentication, identity, and permission management.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-admin-security-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-admin-security-catalog
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/generated/admin/security
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-admin-security-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers extending the Webiny admin application often struggle to locate the correct security abstractions for authentication, identity, and permission checks across the codebase. This Skill provides a curated catalog of 15 security abstractions with exact import paths and source file locations.

Core Features & Use Cases

  • Authentication Abstractions: Access AuthenticationContext, useAuthentication, LogInUseCase, and LogOutUseCase for login flows.
  • Identity Management: Use IdentityContext and useIdentity to retrieve the current user identity in admin UI components.
  • Permission Controls: Implement permission checks with createHasPermission, createUsePermissions, HasPermissionComponent, and the Permissions type.
  • Use Case: When building a custom admin feature that must hide UI elements based on user permissions, look up HasPermissionComponent in the catalog, read its source file, and import it directly.

Quick Start

Ask the AI to find the Webiny admin security abstraction for checking user permissions and show its import path and source file.

Frequently Asked Questions about webiny-admin-security-catalog

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

FAQPage Schema
How do I check user permissions in a Webiny admin component?

Use the HasPermissionComponent or createHasPermission abstraction from the webiny/admin/security catalog. Read the source file at @webiny/app-admin/presentation/security/components/HasPermission.tsx to get the exact interface before importing.

How do I get the current user identity in Webiny admin?

Use the useIdentity hook or IdentityContext abstraction listed in the security catalog. The hook source is at @webiny/app-admin/presentation/security/hooks/useIdentity.ts and returns the current identity for the logged-in user.

What abstractions handle login and logout in Webiny admin?

LogInUseCase and LogOutUseCase handle authentication flows, located under @webiny/app-admin/features/security. The useAuthentication hook and AuthenticationContext provide lower-level access to authentication state.

Does the Webiny security catalog include TypeScript types for permissions?

Yes, the Permissions type is exported from @webiny/app-admin/permissions/types.ts and represents the canonical type for DI-resolved permissions. It matches the UsePermissionsResult type used by permission hooks.

When should I read the source file instead of just importing an abstraction?

Always read the source file first, as the catalog instructs, to get the exact interface and types. The catalog only provides names, import paths, and locations, not full type signatures or usage contracts.