The permission model and the backend entry
The permission-code catalog, registration-time validation, the hard administrators-only constraints, the built-in roles' minimal code set, and the reconciliation of panel buttons and routes sharing one code.
The backend's permissions are not "a role table + some switches"; they are three pieces that must interlock: a permission-code catalog registered in the kernel, role-and-account assignments, and the check on every request and every button. When any of the three pieces disagrees anywhere, the symptom is not an error but a feature quietly not working — this page is mainly about that.
Permission codes have a catalog and a domain. Every code is declared in exactly one place (the kernel's permission registry), carrying its own business prefix: assistant configuration, assistant translation, customer-service participation surface, notifications, operations archiving, content writing, account management each belong to their own domain. The domains are not for tidiness but so that "checking customer service in the grant UI" does not mean "this person can change what the bot says to visitors" — the blast radius of the two is completely different. The cost must also be stated: a feature spanning two business domains checks two cells; that is the price of domains, not a misconfiguration.
The declaration stage catches the most errors. When a plugin references a code in its own manifest (a route's Require, panel and field write permissions, menu items, action buttons, backend commands), the kernel looks it up in the catalog at registration time. Not found means registration fails and the process will not start. This design looks harsh, but the reverse — after being let through — has the bad shape of "the button draws, is clickable, and is refused every time", with no layer going red. Also blocked at registration: commands declaring a code not registered (which means no role can ever be granted it), batch actions carrying row numbers, and action endpoints written as relative paths.
A few capabilities are hard-bound to administrators only. Taking away the whole-site archive, database backup downloads, kernel account management — these are directly marked "administrators only" in the permission catalog: ordinary roles cannot apply for them, and the runtime re-checks identity once more. Wrong grants that already exist are not left silently: they are withdrawn when startup registration and database restore coordinate, and the withdrawn roles and codes are each traced and committed atomically with the audit, and the backend can see "what was withdrawn this time". The motive is blunt: a complete archive holds the whole store, uploads, themes, plugins and the certificate private key, and who can take it away should not be decided by a casual grant.
The built-in roles seed the minimal code set. A fresh instance carries two customer-service roles: one "order-taking eligibility" code and a pair of "read conversations / write conversations" codes. Message boards, assistant configuration and content writing are not in it. One code missing, the administrator can add it in the backend at any time; one code extra is often only found by audit — the two kinds of mistakes are asymmetric to fix, so the default takes the narrow side.
Panel visibility is computed server-side; button codes and route codes share one source. In the backend sidebar and panel catalog, every panel carries the server-side computed conclusion "can this account see it", and the frontend only avoids drawing entries that would 403 for sure. The action buttons of declarative panels use the same code as that route; this has a reconciliation: changing both sides separately results in the plugin endpoint and the panel declaration each being "correct", while every click on the UI fails.
Beyond permissions there is another layer of ownership. Customer-service conversation bodies are narrowed once more by "is this conversation one I am handling": the take-over step needs the customer-service write permission (it is the only action that can turn "bystander" into "handler"), while reads and exports are tiered by ownership. This layer is not part of the permission model, but its missing shape is typical — the transfer succeeded, and the UI still keeps a button that returns 403 when clicked.
The new password rules. At least 8 characters, must contain English uppercase, lowercase and digits at the same time; special symbols are not required. Installation, creating accounts and resetting passwords go through the same backend criterion, with Chinese and English prompts in sync. The security center can raise the minimum length (the floor stays 8). The upgrade does not force any existing account to change its password, and an already-saved higher length requirement is not silently overwritten.
The interface itself has two boundaries. The backend is desktop-browser only, not adapted for phones and tablets; the UI supports exactly Chinese and English, and plugins must carry bilingual titles, fields and copy themselves, and are not allowed to invent a third dictionary. These two are product constraints, not unfinished work.
If you need to call backend interfaces from an external program, there is only one thing to know: call with the code you were granted; do not guess. Every refusal carries a stable error code and one explanation; missing code and no permission are two different failures, and mixing them into "the interface is broken" wastes the first hour of troubleshooting.