nocobase-app-plugin-authz-default-access
What it does
This skill configures default access for NocoBase 3 business actions, giving a shared baseline of records. It is for administrators and developers who manage record visibility.
When to use it
- ✓When everyone with a certain action should see a common set of records by default.
- ✓When you want a department-wide baseline for reading records but not for editing them.
- ✓When you need to check or manage default access in production.
Skill link
https://github.com/nocobase/nocobase/blob/v3-develop/packages/plugins/app-plugin-authz-default-access/skills/nocobase-app-plugin-authz-default-access/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you make every sales user able to read all open leads by default, while editing stays limited to the owner?”
5 new skills a week. 1 minute to read.
How it works
The AI sets a default data scope for one operation. It does not grant the action itself, and other rules still narrow the results.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Develop default access
Default access adds a shared record baseline for every identity that already holds an action. It does not grant the action, page access or additional fields. A baseline combines with permission-set data scopes and sharing, and restriction rules still narrow the result, so choose it as an intentional minimum range rather than a fallback for identities without a scope of their own.
Read the installed nocobase-app-plugin-authorization Skill first for composite resources, data scopes, fields, server policy enforcement and inherited subjects. The package README at node_modules/@nocobase/app-plugin-authz-default-access/README.md is the complete reference for the service, the HTTP routes and the exports; this Skill covers how to use them.
For a department-scoped baseline, read the application development Skill's references/organization/permission-design.md first. Its core works with permission sets alone, and its optional default-access section explains why a global default suits a department scope only when everyone holding the action belongs to a department.
Development workflow
- Identify which records every holder of a particular operation should receive by default. A read baseline can be broad while edit remains preparer-only; do not copy read defaults into write operations.
- Confirm the composite, action and data scope exist and that the scope's grants target the intended collection. Reuse an applicable record access or define one through the main authorization Skill.
- Save one rule per resource under a stable
key; a second rule on the same resource is rejected, so extend the existing rule instead. A rule lists every action and data scope it widens; updating it replaces the whole rule, and deleting it removes the baseline, not the permission-set action. - Verify a holder receives the baseline, a person without the action remains denied, and restrictions still remove excluded rows. Also verify an explicit narrow data scope is not unexpectedly broadened by a permissive default.
For example, a quote view baseline can follow related-project ownership while editing follows the preparer, and a job's permission set can separately grant broad viewing that confidentiality restrictions narrow. A project's owner is not necessarily the author of every quote on that project.
Install
Register the default export of @nocobase/app-plugin-authz-default-access/client in client/plugins.ts and of @nocobase/app-plugin-authz-default-access/server in server/plugins.ts, beside the main authorization plugin, and run the application's migrations. Add the factory to the plugins of server/config/authorization.ts, merged with the application's other rule factories:
import { defaultAccess } from '@nocobase/app-plugin-authz-default-access/server';
import {
defineAppConfig,
type AppConfigFactory,
} from '@nocobase/app-server/config';
import type { AuthorizationConfig } from '@nocobase/app-plugin-authorization/server';
const authorization: AppConfigFactory<AuthorizationConfig> = defineAppConfig(
() => ({ plugins: [defaultAccess()] }),
);
export default authorization;
During setup the factory registers the settings item authorization.default-access (group authorization, actions read, create, update, delete) and its routes under /api/authorization/defaultAccess, which the running application documents at /api/swagger/docs under the Authorization tag. Without the factory in the configuration the plugin adds no API and no route.
Service API
Resolve authorizationToken from @nocobase/app-plugin-authorization/server in the owning provider or route factory. The rule API exists only when the factory is configured, so narrow the service before using it. quotes is the application's own composite and sales.prepared its own record access, both defined as the main Skill describes.
import { selection } from '@nocobase/authorization/core';
import {
defineDefaultAccessRule,
type DefaultAccessAuthorizationApi,
} from '@nocobase/authorization/default-access';
import type { DatabaseConnection } from '@nocobase/db';
if (!('defaultAccess' in authz))
throw new Error('Default access is not configured');
const rules = (
authz as typeof authz & DefaultAccessAuthorizationApi<DatabaseConnection>
).defaultAccess;
await rules.create(
defineDefaultAccessRule('quotes-baseline', quotes.reference())
.scope('edit', 'quotes', selection.recordAccess('s
FAQ
Does it give new permissions?
No. It adds a shared baseline only for people who already hold the action.
Can restriction rules override it?
Restriction rules still narrow the records that default access allows.
Does it cover fields too?
No. It covers the records an action can reach, not extra fields.
Details
Original description by the author
Design, implement and verify default access for NocoBase 3 business operations, including named data scopes and production administration.
repo: nocobase/nocobase
Popularity
- GitHub stars
- 25k
- Ranking position
- #10091
- License
- —
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
nocobase-app-development
25kHelps your agent build pages, routes, data, permissions, and tests for a complete NocoBase 3 business application.
shadcn
25kHelps your agent find, add, fix, and style shadcn/ui components in a web project, using their official docs and registries.
nocobase-app-plugin-development
25kHelps your agent create and maintain NocoBase 3 plugins inside an existing app, including server, client, database, and registration parts.
nocobase-app-upgrade
25kHelps your agent upgrade a NocoBase app to a newer template release, bringing in template changes while keeping your own work.
Similar skills
reverse-engineer-anything
422kHelps your agent look inside shipped apps and packages to explain features, compare versions, or guide a rebuild, using the REA tool.
1password
394kHelps your agent set up the 1Password CLI, sign in, and read or inject secrets without printing their values into chat.
healthcheck
394kHelps your agent audit the computer or server that runs OpenClaw for security risks, such as SSH, firewall, updates, and backups, then suggest safe fixes.