- type: permissioneditor with mode radio (1, -1) or checkbox (1); the controller serves the options per request through cabana.PermissionEditorProvider and reads and stores the values - a save answers 422 for a non-object, an unknown code or a value outside the mode's set and 403 for a changed locked code; stored codes that are not offered are kept - record responses carry the stored permissions as an object - SPA: PermissionEditorField with sections by tab, locked rows and a read-only mode for the preview - README, docs, OpenAPI document, TS types and dist updated
11 lines
410 B
JSON
11 lines
410 B
JSON
{
|
|
"data": { "id": 1, "name": "Ada Lovelace", "email": "ada@example.test", "slug": "ada-lovelace", "joined_ip": "203.0.113.7", "permissions": { "legacy.code": 1, "posts.edit": 1, "reports.export": 1 } },
|
|
"meta": {
|
|
"labels": {},
|
|
"actions": [
|
|
{ "name": "activate", "label": "Activate" },
|
|
{ "name": "reinstate", "label": "Reinstate", "confirm": "Lift the ban on this person?" }
|
|
]
|
|
}
|
|
}
|