Locked items — why Studio will not let you edit or delete one
What a locked item is, why its package locked it, and what an administrator can do instead of editing or deleting it.
You opened an app, an object or a view in Studio and found an amber banner above it: This item is locked and cannot be edited or deleted. This page explains what that banner means and what you can do next.
What is locked
A package can lock an item it ships. The lock covers the item's definition,
meaning the app, object, view or other metadata the package delivered. It does
not cover the records stored in an object: a locked sys_user object stops
you from changing what a user record is, not from managing your users.
There are three locks. The banner's title tells you which one applies:
| Lock | Banner title | What is refused |
|---|---|---|
no-overlay | This item is locked and cannot be edited. | Saving a change, publishing a draft, rolling back to an earlier version |
no-delete | This item is locked and cannot be deleted. | Deleting the item |
full | This item is locked and cannot be edited or deleted. | All of the above |
When the lock is the gate that refuses a write, the answer is
403 ITEM_LOCKED, the refusal carries the same reason the banner shows, and the
attempt is recorded in the metadata audit trail. The lock is not always the
first gate, though: an item a package ships can be refused before the lock is
asked, as Two other refusals explains.
Why it is locked
The text under the banner's title is the package's own reason. The banner also names the package and its version, and a View docs link that goes wherever the package author pointed it.
The platform locks its own items for two reasons:
- The identity tables belong to the sign-in service. Users, sessions, organizations, members, teams, API keys, two-factor, OAuth, SSO and SCIM records are read and written by the authentication layer, which expects exactly the fields it declares. A changed field or a removed object would break sign-in.
- Setup, Studio and Account are the platform's own administration apps. They ship with the platform and are upgraded with it.
What you can do instead
A lock never stops you from using the item. These routes do what an edit would have done, without changing the locked item:
- Work with the records. The lock leaves records to the object's own rules. Records of most objects are edited as usual, under the permissions your positions grant. Identity records change through the sign-in service's own actions, such as inviting, banning or unlocking a user: the administrator guide covers them.
- Add fields to a locked object. An object extension adds fields, validations and indexes to an object another package ships, without editing that object. For the platform's own identity objects this is a developer's route: the extension is declared in a code package, because the platform's packages have no customization package an environment can save into.
- Make your own item. When the item's type can be created at runtime, the banner carries a New button. Your new item has its own name and is yours to change.
- Take an editable copy of a third-party package. A package that allows an unmanaged install can be installed as a copy, and the copy keeps no lock. The copy no longer receives the package's upgrades.
- Ask the package's author. The lock is the author's decision, and only a new version of the package can change it.
There is no switch that lets an administrator lift a lock in place.
Two other refusals
403 NOT_OVERRIDABLErefuses an in-place edit of an item a package ships because the package, not the environment, owns it. It is asked before the lock, so it is the answer you get first for the platform's own objects and apps: a save that names no package answersNOT_OVERRIDABLEeven though those items are also locked, and so does the delete of an object where the deployment runs an environment kernel. A save that names the read-only package instead answers403 ITEM_LOCKED, and its message says the package is read-only rather than giving the item's reason. A package you installed is customized through its paired customization package instead: see What a managed install keeps. Flows, actions and permission sets name their own routes, such as a clone or an on/off switch: see Packaged flows, actions and permission sets.409 RECORD_LOCKEDrefuses an edit of a record while an approval holds it: see Approvals.
For package authors
Lock an item by giving it a protection block:
export const SETUP_APP: App = {
name: 'setup',
label: 'Setup',
protection: {
lock: 'full',
reason: 'Core admin UI shipped by @objectstack/platform-objects.',
docsUrl: 'https://objectstack.ai/docs/permissions/locked-items',
},
// ...
};reasonis shown to the administrator under the banner's title, so write it for them: say why the item is locked and what to do instead.docsUrlis the banner's View docs link. Point it at a page that answers the administrator's next question. This page is the default for the platform's own items.- The block takes effect when the package is loaded. The metadata API's save
(
PUT /api/v1/meta/{type}/{name}) writes items an environment authors, which take no package lock, so a body that carries aprotectionblock is refused and nothing is stored:400 VALIDATION_ERRORon a type whose schema declares the block, and422 INVALID_METADATAon one that does not (anaction, ahookor apage).
The full list of keys and values is the schema source,
packages/spec/src/shared/protection.zod.ts.
The design is recorded in
ADR-0010.