- AdminRoles: capability sub-toggles under each granted app - AdminUsers: per-app direct capability grants; role-derived capabilities shown read-only as "(role)" - types: Role.capabilities + Capability interface Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
37 lines
710 B
TypeScript
37 lines
710 B
TypeScript
export interface Role {
|
|
id: number
|
|
name: string
|
|
slug: string
|
|
description: string | null
|
|
is_default: boolean
|
|
app_slugs: string[]
|
|
capabilities: string[] // "<app>:<cap>" strings granted to this role
|
|
}
|
|
|
|
// One capability an app exposes, as returned by /admin/capabilities.
|
|
export interface Capability {
|
|
app_slug: string
|
|
slug: string
|
|
name: string
|
|
description: string | null
|
|
sort_order: number
|
|
}
|
|
|
|
export interface App {
|
|
slug: string
|
|
name: string
|
|
description: string
|
|
base_path: string
|
|
icon: string
|
|
theme_color: string
|
|
category: string | null
|
|
}
|
|
|
|
export interface User {
|
|
id: number
|
|
email: string
|
|
name: string
|
|
is_admin: boolean
|
|
offsite_allowed: boolean
|
|
apps: App[]
|
|
}
|