adminforth 1.3.52-next.1 → 1.3.52-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/modules/restApi.js +4 -1
- package/modules/restApi.ts +6 -2
- package/package.json +1 -1
- package/spa/src/App.vue +0 -6
package/dist/modules/restApi.js
CHANGED
|
@@ -160,9 +160,12 @@ export default class AdminForthRestAPI {
|
|
|
160
160
|
const dbUser = adminUser.dbUser;
|
|
161
161
|
username = dbUser[this.adminforth.config.auth.usernameField];
|
|
162
162
|
userFullName = dbUser[this.adminforth.config.auth.userFullNameField];
|
|
163
|
+
const userResource = this.adminforth.config.resources.find((res) => res.resourceId === this.adminforth.config.auth.usersResourceId);
|
|
164
|
+
const userPk = dbUser[userResource.columns.find((col) => col.primaryKey).name];
|
|
163
165
|
const userData = {
|
|
164
166
|
[this.adminforth.config.auth.usernameField]: username,
|
|
165
|
-
[this.adminforth.config.auth.userFullNameField]: userFullName
|
|
167
|
+
[this.adminforth.config.auth.userFullNameField]: userFullName,
|
|
168
|
+
pk: userPk,
|
|
166
169
|
};
|
|
167
170
|
const checkIsMenuItemVisible = (menuItem) => {
|
|
168
171
|
if (typeof menuItem.visible === 'function') {
|
package/modules/restApi.ts
CHANGED
|
@@ -193,11 +193,15 @@ export default class AdminForthRestAPI {
|
|
|
193
193
|
|
|
194
194
|
const dbUser = adminUser.dbUser;
|
|
195
195
|
username = dbUser[this.adminforth.config.auth.usernameField];
|
|
196
|
-
userFullName =dbUser[this.adminforth.config.auth.userFullNameField];
|
|
196
|
+
userFullName = dbUser[this.adminforth.config.auth.userFullNameField];
|
|
197
|
+
const userResource = this.adminforth.config.resources.find((res) => res.resourceId === this.adminforth.config.auth.usersResourceId);
|
|
198
|
+
|
|
199
|
+
const userPk = dbUser[userResource.columns.find((col) => col.primaryKey).name];
|
|
197
200
|
|
|
198
201
|
const userData = {
|
|
199
202
|
[this.adminforth.config.auth.usernameField]: username,
|
|
200
|
-
[this.adminforth.config.auth.userFullNameField]: userFullName
|
|
203
|
+
[this.adminforth.config.auth.userFullNameField]: userFullName,
|
|
204
|
+
pk: userPk,
|
|
201
205
|
};
|
|
202
206
|
const checkIsMenuItemVisible = (menuItem) => {
|
|
203
207
|
if (typeof menuItem.visible === 'function') {
|
package/package.json
CHANGED
package/spa/src/App.vue
CHANGED
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
v-for="c in coreStore?.config?.globalInjections?.header || []"
|
|
23
23
|
:is="getCustomComponent(c)"
|
|
24
24
|
:meta="c.meta"
|
|
25
|
-
:record="coreStore.record"
|
|
26
|
-
:resource="coreStore.resource"
|
|
27
25
|
:adminUser="coreStore.adminUser"
|
|
28
26
|
/>
|
|
29
27
|
|
|
@@ -58,8 +56,6 @@
|
|
|
58
56
|
<component
|
|
59
57
|
:is="getCustomComponent(c)"
|
|
60
58
|
:meta="c.meta"
|
|
61
|
-
:record="coreStore.record"
|
|
62
|
-
:resource="coreStore.resource"
|
|
63
59
|
:adminUser="coreStore.adminUser"
|
|
64
60
|
/>
|
|
65
61
|
</li>
|
|
@@ -169,8 +165,6 @@
|
|
|
169
165
|
v-for="c in coreStore?.config?.globalInjections?.sidebar || []"
|
|
170
166
|
:is="getCustomComponent(c)"
|
|
171
167
|
:meta="c.meta"
|
|
172
|
-
:record="coreStore.record"
|
|
173
|
-
:resource="coreStore.resource"
|
|
174
168
|
:adminUser="coreStore.adminUser"
|
|
175
169
|
/>
|
|
176
170
|
</div>
|