diff --git a/adminforth/modules/restApi.ts b/adminforth/modules/restApi.ts index 78a8c946..f4ddc332 100644 --- a/adminforth/modules/restApi.ts +++ b/adminforth/modules/restApi.ts @@ -376,6 +376,14 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI { } } + let defaultUserExists = false; + if (username === 'adminforth') { + defaultUserExists = true; + } + const headers = response.getHeaders?.() || {}; + const clientIp = this.adminforth.auth.getClientIp(headers); + const isPrivateIP = clientIp === null ? true :false; + const publicPart = { brandName: this.adminforth.config.customization.brandName, usernameFieldName: usernameColumn.label, @@ -404,6 +412,8 @@ export default class AdminForthRestAPI implements IAdminForthRestAPI { globalInjections: this.adminforth.config.customization.globalInjections, userFullnameField: this.adminforth.config.auth.userFullNameField, settingPages: settingPages, + defaultUserExists: defaultUserExists, + isPrivateIP: isPrivateIP, } // translate menu labels diff --git a/adminforth/spa/src/components/Sidebar.vue b/adminforth/spa/src/components/Sidebar.vue index 2881f182..0c9ade0b 100644 --- a/adminforth/spa/src/components/Sidebar.vue +++ b/adminforth/spa/src/components/Sidebar.vue @@ -51,6 +51,11 @@ +
+ + Default user "adminforth" detected. Delete it and create your own account. +
+