Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

nocobase-app-plugin-users

БесплатноБез исполняемых скриптовНе проверен

Integrate the Users plugin into a NocoBase App, use or replace its User management pages under System settings, configure their permissions, add an…

nocobaseот nocobase★ 25 082 звезды на 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 the User management pages under System settings and the public invitation page at /invite/:token.
  • Route ids of the User management pages, from @nocobase/app-plugin-users/client: USERS_ROUTE_ID (the list at /settings/users), USER_CREATE_ROUTE_ID (the New user dialog at /settings/users/create) and USER_EDIT_ROUTE_ID (the Edit user drawer at /settings/users/:userId/edit).
  • UserForm, the page component behind both the New user dialog and the Edit user drawer, and RoleSelection, its searchable role picker, from @nocobase/app-plugin-users/client, for a replacement page that keeps the plugin's validation and role selection.
  • Typed API client: UsersClient and 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.
  • Accounts from server code, such as demo accounts in sample data: container.resolve(userManagementServiceToken).create({ name, email, password, username?, roleScopes? }) returns the managed user with its id. roleScopes: { app: ['<permission set id>'] } assigns the direct roles in the same call, and the permission sets must already exist. Register the work on sampleDataToken from @nocobase/app-server/sample-data: a seed's restricted database context cannot reach the service.
  • 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, requires user/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, and PUT /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 the Users tag. Failures use the standard error body; branch on error.reason, such as USER_NOT_FOUND, SELF_DELETE_NOT_ALLOWED, LAST_ASSIGNMENT or USER_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

  1. Register Authentication, Authorization, and then Users in the App's Client and Server plugin arrays. The Client factory takes no placement options: users().
  2. Grant only the user actions those roles need, on { type: 'user', id: '*' } because user is a record type. The plugin creates no roles and grants no access by itself.
  3. User management is ready once the plugin is registered: users() adds it to the Accounts and permissions category of System settings at /settings/users, with its page access (read on user, and create for the New user dialog). Do not declare another /settings/users route in the App; a duplicate path is a conflict.

Replace a User management page

Replace a page, not the route: pass routeComponentOverrides to defineAppRuntime() in the App's client/runtime.ts, keyed by the exported route ids, as section 10 of the nocobase-app-development Skill's pages and routes reference (references/frontend/references/page.md) describes. The path, page access, navigation, dialog or drawer presentation and breadcrumb stay the plugin's, and the pages that are not replaced stay the plugin's own; replacing only the list keeps the plugin'

Полный SKILL.md на GitHub

Установить nocobase-app-plugin-users в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл nocobase-app-plugin-users?

Integrate the Users plugin into a NocoBase App, use or replace its User management pages under System settings, configure their permissions, add an application-owned role scope through the public Server contracts, or let people choose a set of users (approvers, recipients) with the user scope picker and resolution service, including registering a new way to choose people such as by department.

Как установить скилл nocobase-app-plugin-users?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл nocobase-app-plugin-users запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить nocobase-app-plugin-users с