webiny-admin-tenancy-catalog

Catalogs Webiny admin tenancy abstractions with import paths and source file references.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers extending the Webiny admin application often struggle to locate the correct tenancy-related hooks, components, and types across the monorepo. This Skill provides a curated catalog of 9 tenancy abstractions with exact import paths and source file locations.

Core Features & Use Cases

  • Abstraction Lookup: Lists tenant context hooks (useCurrentTenant, useTenantContext), tenant guard components (IsRootTenant, IsNotRootTenant, IsTenant), and tenant management hooks (useEnableTenant, useDisableTenant).
  • Exact Import Paths: Each entry includes the precise import statement from "webiny/admin/tenancy" plus the underlying source file in @webiny/tenant-manager or @webiny/app-admin.
  • Use Case: When building a multi-tenant admin extension, quickly find IsRootTenant to conditionally render UI only for root tenant users, then read the source file to confirm its props and behavior.

Quick Start

Ask the AI to show you how to conditionally render admin UI based on the current tenant using the Webiny tenancy abstractions.

Frequently Asked Questions about webiny-admin-tenancy-catalog

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

FAQPage Schema
How do I get the current tenant in a Webiny admin extension?

Use the useCurrentTenant hook imported from "webiny/admin/tenancy". It is implemented in @webiny/tenant-manager/admin/CurrentTenant/useCurrentTenant.ts; read that source file to confirm its return type before use.

How to conditionally render UI for root tenant only in Webiny?

Wrap your component with the IsRootTenant guard component from "webiny/admin/tenancy". For the inverse case, use IsNotRootTenant, or use IsTenant to match a specific tenant.

What hooks manage tenant status in Webiny admin?

Webiny provides useEnableTenant and useDisableTenant hooks, both exported from "webiny/admin/tenancy" and implemented in @webiny/tenant-manager/admin. They handle enabling and disabling tenants programmatically.

Does Webiny support multi-tenancy in the admin app?

Yes, Webiny has native multi-tenancy with tenant isolation. The admin layer exposes TenantContext, useTenantContext, and the TenantEntry type for building tenant-aware admin extensions.

Where are Webiny tenancy abstractions implemented?

Most tenancy abstractions live in @webiny/tenant-manager/admin, while TenantContext and useTenantContext come from @webiny/app-admin. All are re-exported through the "webiny/admin/tenancy" import path.