nocobase-app-plugin-users
하는 일
이 스킬은 NocoBase Users 플러그인을 앱에 통합하고, 그 API를 기반으로 사용자 관리 페이지를 만듭니다. 누가 앱의 계정을 가지는지 관리하는 관리자와 개발자를 위한 스킬입니다.
사용하는 경우
- ✓관리자가 사용자 계정을 만들고, 비활성화하고, 재설정하는 페이지가 필요할 때.
- ✓다른 플러그인이 사용자 관리에 자체 역할을 추가해야 할 때.
- ✓사용자 플러그인의 권한을 설정해야 할 때.
스킬 링크
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-users/skills/nocobase-app-plugin-users/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“관리자가 사람들을 초대하고 계정을 비활성화할 수 있는 사용자 관리 페이지를 제 NocoBase 앱에 추가해 주실 수 있나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
AI는 플러그인을 등록하고, 목록 조회, 생성, 업데이트, 비활성화, 재설정 작업을 위한 API로 페이지를 만듭니다. 계정과 세션 저장은 인증 플러그인이 담당합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
User Management App Plugin
Use this Skill when an application needs user management, or when another plugin needs to expose application-specific roles in user management. Do not use it to modify the Users plugin source or to replace Authentication's user, account, or Session storage.
Public surfaces
- Client registration factory and
UsersClientOptions:@nocobase/app-plugin-users/client. It contributes only the public invitation page at/invite/:token; there is no user management page. - Typed API client:
UsersClientand its types from@nocobase/app-plugin-users/client/user-client. - Server contracts:
userManagementServiceToken,userRoleScopeRegistryToken,UserRoleScope, and related types from@nocobase/app-plugin-users/server/tokens. - HTTP API:
GET /api/users(page,pageSize,q,status,roleScope,role,sort=name,order=asc|desc; answers{ data, meta: { page, pageSize, total } }),GET /api/users/options,GET /api/users/:userId(latest managed profile and role scopes, requiresuser/read, 404 for absent accounts),POST /api/users,PATCH /api/users/:userId,DELETE /api/users/:userId?confirm=true,POST /api/users/:userId/disable|enable|resetPassword|revokeSessions, andPUT /api/users/:userId/roleScopes/:scope. The running application documents each one, with request and response schemas, at/api/swagger/docs(JSON at/api/swagger) under theUserstag. Failures use the standard error body; branch onerror.reason, such asUSER_NOT_FOUND,SELF_DELETE_NOT_ALLOWED,LAST_ASSIGNMENTorUSER_EMAIL_CONFLICT.
UsersClient.update(userId, { name?, username?, email?, roleScopes? }) supports one atomic editor Save. Profile fields require update; submitted roleScopes additionally require assign-role. A roles-only payload requires assign-role without update. The service validates scope values, runs each applicable target-account guard, and commits profile changes and all submitted scope replacements in the caller-owned transaction, notifying permission clients only after commit. Omitted scopes are preserved. Keep the existing per-scope PUT for callers needing only one scope. Do not implement a combined Save as sequential profile and role requests: a later failure would leave a partially saved account.
Every HTTP route requires Authentication and Authorization. Routes check the user record type with the applicable action from read, create, update, disable, enable, assign-role, reset-password, revoke-sessions or delete. Account creation checks both create and assign-role. delete is permitted only while an application role scope can clean a deleted user up.
Register the plugin
- Register Authentication, Authorization, and then Users in the App's Client
and Server plugin arrays. The Client factory takes no placement options:
users(). - Grant only the
useractions those roles need, on{ type: 'user', id: '*' }becauseuseris a record type. The plugin creates no roles and grants no access by itself. - For a user management page, build it in the App on
UsersClientand declare it among the App's own routes with the page access it needs; the plugin ships none.
The invitation page reports results through useToaster() from @nocobase/app-client, so the App needs the @nocobase/app-client that exports it and registers a toaster service, as the templates do: client/lib/toaster.ts from the template, and this.app.container.instance(toasterToken, createToaster()) in the register() of client/service-provider.ts, with the Toaster component mounted in client/react-providers.ts. Without the registration nothing throws, but its toasts are only logged to the browser console.
The default app permission-set scope is supplied by Users whenever the Authorization plugin's authorizationToken is available. Do not copy a user-roles Provider into an application. Set users.permissionSets: false to replace the default with an application-owned scope.
Add an application role scope
Resolve userRoleScopeRegistryToken in an application or business plugin
ServiceProvider and register one UserRoleScope during boot(). The scope owns
its available options, current assignment lookup, role filtering, atomic
replacement, and any disable guard. Unregister it during shutdown().
Use the DatabaseConnection passed to each scope method. This is the
caller-owned transaction used to keep account cr
자주 묻는 질문
로그인 시스템을 대체하나요?
아니요. 계정과 세션은 인증 플러그인이 유지합니다.
기본으로 관리자 페이지가 포함되나요?
아니요. 플러그인은 공개 초대 페이지만 추가하므로, 관리자 페이지는 직접 만들어야 합니다.
앱이 자체 역할을 추가할 수 있나요?
네. 앱이나 다른 플러그인이 제공하는 역할 범위 계약을 통해 가능합니다.
상세 정보
작성자의 원본 설명
Integrate the Users plugin into a NocoBase App, build a user management page on its API and configure its permissions, or add an application-owned role scope through the public Server contracts.
repo: nocobase/nocobase
인기도
- GitHub 스타
- 25k
- 순위
- #10107
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
nocobase-app-development
25k에이전트가 완전한 NocoBase 3 업무 애플리케이션을 위해 페이지, 라우트, 데이터, 권한, 테스트를 만들도록 돕습니다.
shadcn
25k에이전트가 웹 프로젝트에서 공식 문서와 레지스트리를 사용해 shadcn/ui 컴포넌트를 찾고, 추가하고, 고치고, 스타일을 입히도록 돕습니다.
nocobase-app-plugin-development
25k에이전트가 기존 NocoBase 3 앱 안에서 서버, 클라이언트, 데이터베이스, 등록 부분을 포함한 플러그인을 만들고 관리하도록 돕습니다.
nocobase-app-upgrade
25k에이전트가 NocoBase 앱을 더 새로운 템플릿 릴리스로 업그레이드하고, 사용자의 작업을 지키면서 템플릿 변경을 가져오도록 돕습니다.