Add Khanegi default appearance snapshot seed and strip SA meta from get_user.
Mirrors Hamkar so each khanegi tenant can restore its factory ui-config without exposing defaultSnapshot publicly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -75,7 +75,8 @@ export class GetUserService {
|
||||
product: tenant.product,
|
||||
theme: themeMode,
|
||||
mode: themeMode,
|
||||
app_ui_config: tenant.product === 'khanegi' ? ui : undefined,
|
||||
app_ui_config:
|
||||
tenant.product === 'khanegi' ? this.stripKhanegiSaMeta(ui) : undefined,
|
||||
/** Laravel-compatible overlay; Hamkar merges only when present */
|
||||
ui_settings: uiSettings.length ? uiSettings : undefined,
|
||||
};
|
||||
@@ -86,6 +87,12 @@ export class GetUserService {
|
||||
};
|
||||
}
|
||||
|
||||
private stripKhanegiSaMeta(ui: Record<string, any> | null) {
|
||||
if (!ui || typeof ui !== 'object') return ui;
|
||||
const { defaultSnapshot: _snap, _backfill, ...rest } = ui;
|
||||
return rest;
|
||||
}
|
||||
|
||||
private buildHamkarUiSettings(ui: Record<string, any>): UiSetting[] {
|
||||
const settings = ui?.settings;
|
||||
if (!settings || typeof settings !== 'object') return [];
|
||||
|
||||
Reference in New Issue
Block a user