webiny-admin-permissions
하는 일
이 스킬은 Webiny 관리자 인터페이스에 권한 제어를 추가할 때 AI를 안내합니다. 관리자 패널에서 사용자가 보거나 할 수 있는 것을 제한해야 하는 개발자를 위한 스킬입니다.
사용하는 경우
- ✓Webiny 관리자 기능에 권한 설정을 추가해야 할 때.
- ✓권한 양식을 손으로 쓰지 않고 스키마에서 생성하고 싶을 때.
- ✓사용자의 권한에 따라 화면 일부를 보이거나 숨겨야 하는 경우.
스킬 링크
https://github.com/webiny/webiny-js/blob/next/skills/user-skills/admin/admin-permissions/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“제품 섹션에 권한 제어를 추가해 주세요. 편집과 가져오기에 대해 각각 다른 규칙을 적용해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
이 스킬은 권한 스키마를 정의하는 방법을 설명하며, 이 스키마로 권한 양식이 생성됩니다. 또한 주입 가능한 권한 검사와, 화면 일부를 보이거나 숨기는 컴포넌트도 다룹니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Admin Permissions
Overview
Permissions follow three layers: domain (schema), features (DI artifacts + registration), and presentation (hooks, components, UI config). The framework auto-generates the permission UI from a schema and provides injectable permission checking via the DI container.
Layer 1: Domain — Permission Schema
Define the schema in src/domain/permissionsSchema.ts:
import { createPermissionSchema } from "webiny/admin/security";
export const SM_PERMISSIONS_SCHEMA = createPermissionSchema({
prefix: "sm",
fullAccess: true,
entities: [
{
id: "product",
title: "Products",
permission: "sm.product",
scopes: ["full", "own"],
actions: [
{ name: "rwd" },
{ name: "pw" },
{ name: "import", label: "Import products" },
{ name: "export", label: "Export products" }
]
},
{
id: "category",
title: "Categories",
permission: "sm.category",
scopes: ["full"],
actions: [{ name: "rwd" }]
},
{
id: "settings",
title: "Settings",
permission: "sm.settings",
scopes: ["full"]
}
]
});
Schema Reference
| Field | Type | Required | Description |
|---|---|---|---|
prefix |
string |
Yes | Permission prefix (e.g., "sm") |
fullAccess |
true | object |
Yes | true for standard full access. Pass an object with custom boolean flags for full-access extras (e.g., { canForceUnlock: true }). |
readOnlyAccess |
boolean |
No | Whether to show a "Read-only access" option |
entities |
EntityDefinition[] |
No | Entity definitions. Omit for binary full/no access. |
Entity Definition
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
Yes | Unique identifier for form field naming |
title |
string |
No | Display title. Falls back to id. |
permission |
string |
Yes | Permission name emitted (e.g., "sm.product") |
scopes |
("full" | "own")[] |
Yes | Available access scopes |
actions |
ActionDefinition[] |
No | Actions on this entity |
dependsOn |
{ entity: string; requires: string } |
No | Dependency on another entity |
Actions
{ name: "rwd" }— Read/Write/Delete select dropdown. Auto-set to"rwd"when scope is"own".{ name: "pw" }— Publish/Unpublish checkbox group.{ name: "custom", label: "Label" }— Custom boolean flag.
Entity Dependencies
Child entities can depend on a parent. If the parent lacks the required action, the child is pruned from output. "own" scope cascades to dependents.
{
id: "review",
permission: "sm.review",
scopes: ["full", "own"],
actions: [{ name: "rwd" }],
dependsOn: { entity: "product", requires: "r" }
}
Simple Apps (No Entities)
Omit entities for binary full/no access:
export const MA_PERMISSIONS_SCHEMA = createPermissionSchema({
prefix: "ma",
fullAccess: true
});
Layer 2: Features — DI Artifacts + Registration
Abstraction (src/features/permissions/abstractions.ts)
import { createPermissionsAbstraction } from "webiny/admin/security";
import type { Permissions } from "webiny/admin/security";
import { SM_PERMISSIONS_SCHEMA } from "~/domain/permissionsSchema.js";
export const SmPermissions = createPermissionsAbstraction(SM_PERMISSIONS_SCHEMA);
export namespac
자주 묻는 질문
권한 스키마는 무엇을 하나요?
엔티티, 그 작업, 범위를 정의하며, 관리자 양식이 이로부터 생성됩니다.
코드에서 권한은 어떻게 확인하나요?
스킬은 주입 가능한 권한 검사와, 컴포넌트를 위한 타입 훅을 설명합니다.
서버 쪽도 다루나요?
스킬은 관리자 사용자 인터페이스와 그 계층의 권한 검사에 집중합니다.
상세 정보
작성자의 원본 설명
Admin-side permission UI registration and DI-backed permission checking. Use this skill when adding permission controls to the admin UI — schema-based auto-generated forms, injectable permissions via createPermissionsAbstraction/ createPermissionsFeature, typed hooks (createUsePermissions), the HasPermission component (createHasPermission), and the Security.Permissions component props. Covers both simple apps and complex multi-entity permission schemas.
repo: webiny/webiny-js
인기도
- GitHub 스타
- 8.1k
- 순위
- #12575
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
prd-to-plan
8.1k에이전트가 제품 요구사항 문서를 작고 끝까지 이어지는 조각들로 된 단계별 계획으로 바꿔 Markdown 파일로 저장하도록 돕습니다.
webiny-admin-architect
8.1k에이전트에게 Webiny 플랫폼의 관리자 화면을 비즈니스 로직 계층과 프레젠터 패턴으로 만드는 방법을 가르칩니다.
webiny-form-model
8.1k에이전트에게 선언형 필드 빌더, 레이아웃, 검증, 조건부 규칙으로 Webiny 양식을 만드는 법을 가르칩니다.
webiny-new-entry-wizard
8.1k에이전트에게 Webiny CMS에서 새 항목을 만들 때 필드를 먼저 받고 양식을 미리 채우는 마법사를 추가하는 법을 가르칩니다.
비슷한 스킬
angular-developer
280k에이전트가 Angular 코드를 만들고 프로젝트 구조를 조언하도록 돕습니다. 새 프로젝트 시작, 코드 부분 생성, 성능과 접근성 개선에 유용합니다.
frontend-a11y
280k모든 사람이 웹 인터페이스를 쓸 수 있도록 에이전트를 돕습니다. 웹사이트와 앱이 화면 읽기 프로그램과 키보드 탐색에서 잘 작동하도록 합니다.
frontend-patterns
280k프론트엔드 개발의 현대적인 패턴을 적용하도록 에이전트를 돕습니다. React와 Next.js에서 성능을 최적화하고, 상태를 관리하며, 모범 사례를 따릅니다.