nocobase-app-plugin-authorization
Skill này làm gì
Skill này hướng dẫn thiết kế quyền truy cập nghiệp vụ trong ứng dụng NocoBase 3, để những người dùng khác nhau thấy các trang và bản ghi khác nhau. Skill dành cho lập trình viên xây dựng hệ thống mà mỗi người có quyền truy cập khác nhau.
Khi nào nên dùng
- ✓Khi bạn xây dựng hệ thống mà những người khác nhau nên có quyền truy cập khác nhau.
- ✓Khi bạn cần giới hạn bản ghi hoặc trường nào một vai trò được xem hoặc thay đổi.
- ✓Khi bạn muốn kiểm tra hoặc quản lý các quyền đã được thiết lập trong ứng dụng.
Liên kết skill
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-authorization/skills/nocobase-app-plugin-authorization/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể thiết lập ứng dụng NocoBase của tôi để nhân viên bán hàng chỉ thấy khách hàng của mình, còn quản lý thấy tất cả không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
AI xác định vai trò nào cần trang, hành động và phạm vi bản ghi nào. Sau đó nó thiết lập các bộ quyền và đảm bảo các quy tắc được thực thi trên máy chủ.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Authorization development
Use the application's existing authorization service. Resolve authorizationToken from @nocobase/app-plugin-authorization/server in a provider or route factory. Read the application's AGENTS.md and inspect registered plugins and server/config/authorization.ts first. Application-owned features stay in the application's providers/routes/services; create a reusable plugin only when requested.
Identify model and configuration changes
Inspect existing declarations, enforcement, permission sets and installed capability Skills. Classify each requested change by its content, whether the feature is new or already exists. A request can require both model development and configuration.
| Requested change | Work required |
|---|---|
| Add or change supported operations, field/relation capabilities, scope resolver logic, inheritance resolution or server enforcement | Develop the permission model and its execution path, then configure the affected business permissions |
| Change who holds an existing action, select an existing record-access strategy or its supported parameters, or adjust assignments and supported rules | Update permission configuration through the management HTTP API or authorized services |
| Existing declarations have the right names but different behavior from the requirement | Correct the model; matching names alone do not establish that configuration is sufficient |
For permission development, deliver both the implemented model and usable initial configuration based on the responsibility matrix: permission sets, pages/actions, selected scopes, applicable rules and intended user/team assignments. Do not stop at registration and leave configuration to the user unless they explicitly requested model-only work. If recipient identities or access decisions are missing, ask for those specifics while completing independent work; do not guess assignments. Keep configuration editable in the backend and preserve unrelated administrator choices.
Choose delivery by installation state: use seeds for fresh-install defaults and authorized runtime services or a controlled data-change workflow for an existing installation. These are ways to apply configuration, not alternatives to model development. Reuse current management pages and editors. When the App owns a role editor, build it from the UI Library's permission-editor component (yes n | pnpm exec shadcn add @nocobase/permission-editor; its example is @nocobase/permission-editor-demo), selecting the actual application capabilities that administrators need to configure and composing its sections and rows in application-owned code. Registry provides no fixed business catalog. Preserve actual action names, descriptions and independent data scopes; do not copy a full options response or demo catalog into the form. Do not generate a default System and tools category or expose unused optional rule editors. The controlled checkboxes edit a draft saved by the host form. Read the relevant references as needed, beginning with the business workflow for model changes and the service/configuration references for configuration changes.
Map independently assignable business operations to their actual UI entries, server requests, affected fields and scopes. Keep permission titles aligned with operation labels; do not hide independent approval, rejection or repair steps behind a generic Manage action. A shared operation on multiple pages uses the same permission. The server enforces the operation and scopes separately from lifecycle eligibility. When splitting existing actions, migrate stored grants and default, sharing and restriction rules without widening ranges. See the client development reference for the Registry composition and verification contract.
Start from business responsibili
Câu hỏi thường gặp
Đây có giống với đăng nhập không?
Không. Đăng nhập do skill xác thực đảm nhiệm.
Các quy tắc chỉ bị ẩn trên trang đúng không?
Không. Skill nói rằng các quy tắc được thực thi trên máy chủ.
Quyền có thể được cấp theo nhóm không?
Có. Skill có đề cập đến việc kế thừa quyền theo nhóm.
Chi tiết
Mô tả gốc của tác giả
Design and implement NocoBase 3 business permissions: job responsibilities, pages, business actions, fields, record scopes, relations, team inheritance, permission assignments, administration and inspection. Use when building a system or feature whose users have different access.
repo: nocobase/nocobase
Độ phổ biến
- Sao GitHub
- 25k
- Vị trí xếp hạng
- #10090
- Giấy phép
- —
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
nocobase-app-development
25kGiúp agent của bạn xây dựng trang, tuyến, dữ liệu, quyền và kiểm thử cho một ứng dụng kinh doanh NocoBase 3 hoàn chỉnh.
shadcn
25kGiúp agent của bạn tìm, thêm, sửa và tạo kiểu cho các thành phần shadcn/ui trong dự án web, dùng tài liệu chính thức và registry của chúng.
nocobase-app-plugin-development
25kGiúp agent của bạn tạo và duy trì plugin NocoBase 3 trong một ứng dụng có sẵn, gồm phần server, client, cơ sở dữ liệu và đăng ký.
nocobase-app-upgrade
25kGiúp agent của bạn nâng cấp ứng dụng NocoBase lên bản mẫu mới hơn, mang các thay đổi của mẫu vào mà vẫn giữ công việc riêng của bạn.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.