|
18 | 18 | * @see https://protocol.objectstack.ai/docs/guides/security#permission-sets |
19 | 19 | */ |
20 | 20 | import { ObjectSchema, Field } from '@objectstack/spec/data'; |
| 21 | +import type { ServiceObject } from '@objectstack/spec/data'; |
21 | 22 |
|
22 | | -export const PermissionSetObject = ObjectSchema.create({ |
| 23 | +export const PermissionSetObject: ServiceObject = ObjectSchema.create({ |
23 | 24 | name: 'permission_set', |
24 | 25 | label: 'Permission Set', |
25 | 26 | pluralLabel: 'Permission Sets', |
26 | 27 | icon: 'key', |
27 | | - description: 'Unified permission container. Profiles (is_profile=true) and add-on sets (is_profile=false).', |
| 28 | + description: |
| 29 | + 'Unified permission container. Profiles (is_profile=true) and add-on sets (is_profile=false).', |
28 | 30 | isSystem: true, |
29 | 31 |
|
30 | 32 | fields: { |
@@ -71,14 +73,16 @@ export const PermissionSetObject = ObjectSchema.create({ |
71 | 73 | system_permissions: { |
72 | 74 | type: 'json' as const, |
73 | 75 | label: 'System Permissions', |
74 | | - description: 'Array of system permission keys, e.g. ["manage_users", "export_reports", "bulk_api_enabled"]', |
| 76 | + description: |
| 77 | + 'Array of system permission keys, e.g. ["manage_users", "export_reports", "bulk_api_enabled"]', |
75 | 78 | }, |
76 | 79 |
|
77 | 80 | // ── Row-Level Security (spec: rowLevelSecurity) ───────────────────────── |
78 | 81 | row_level_security: { |
79 | 82 | type: 'json' as const, |
80 | 83 | label: 'Row-Level Security', |
81 | | - description: 'Array of RLS policies: [{ name, object, operation, using, check, roles, enabled, priority }]', |
| 84 | + description: |
| 85 | + 'Array of RLS policies: [{ name, object, operation, using, check, roles, enabled, priority }]', |
82 | 86 | }, |
83 | 87 |
|
84 | 88 | // ── ObjectOS extensions (not in spec) ─────────────────────────────────── |
|
0 commit comments