@infuro/cms-core 1.0.41 → 1.0.42
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/README.md +5 -18
- package/dist/admin.cjs +903 -287
- package/dist/admin.d.cts +11 -1
- package/dist/admin.d.ts +11 -1
- package/dist/admin.js +903 -287
- package/dist/api.cjs +35 -35
- package/dist/api.js +3 -3
- package/dist/auth.cjs +51 -51
- package/dist/auth.js +3 -3
- package/dist/{chunk-UXMDSNIG.js → chunk-BLR6H5GL.js} +1 -1
- package/dist/{chunk-P7QCLE5W.js → chunk-DN65KDIA.js} +11 -1
- package/dist/{chunk-QU554KAZ.cjs → chunk-GINYYPXK.cjs} +796 -149
- package/dist/{chunk-4BG7XYSH.js → chunk-I6NH72MO.js} +1 -1
- package/dist/{chunk-ETZN4OQI.cjs → chunk-TAHX46EI.cjs} +6 -6
- package/dist/{chunk-EG4ICILK.js → chunk-W2NL365N.js} +745 -110
- package/dist/{chunk-WMXPKKXU.cjs → chunk-X6UQFV4X.cjs} +11 -1
- package/dist/{chunk-OIGCAGH7.cjs → chunk-ZMRQ72F6.cjs} +7 -7
- package/dist/index.cjs +290 -242
- package/dist/index.d.cts +110 -5
- package/dist/index.d.ts +110 -5
- package/dist/index.js +6 -6
- package/dist/migrations/1781300000000-BrandIsCatalog.ts +61 -0
- package/dist/migrations/1781400000000-ComboEventIdNullable.ts +30 -0
- package/dist/migrations/1781500000000-ProductApprovalWorkflow.ts +30 -0
- package/dist/migrations/1781600000000-ProductApprovalStatusColumn.ts +53 -0
- package/dist/migrations/1781700000000-EventApprovalWorkflow.ts +32 -0
- package/dist/{rbac-debug-db-QWHOENBR.js → rbac-debug-db-2SGNLANF.js} +1 -1
- package/dist/{rbac-debug-db-KHG4FJC3.cjs → rbac-debug-db-4Z6A425H.cjs} +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getPermissionableEntityKeys, ADMIN_GROUP_NAME, isSuperAdmin, permissionRowsToRecord, vendorPortalFlagsFromUser } from './chunk-
|
|
1
|
+
import { getPermissionableEntityKeys, ADMIN_GROUP_NAME, isSuperAdmin, permissionRowsToRecord, vendorPortalFlagsFromUser } from './chunk-DN65KDIA.js';
|
|
2
2
|
import { __name } from './chunk-SHUYVCID.js';
|
|
3
3
|
import { getToken } from 'next-auth/jwt';
|
|
4
4
|
import _CredentialsProvider from 'next-auth/providers/credentials';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkX6UQFV4X_cjs = require('./chunk-X6UQFV4X.cjs');
|
|
4
4
|
var chunkUSNT2KNT_cjs = require('./chunk-USNT2KNT.cjs');
|
|
5
5
|
var jwt = require('next-auth/jwt');
|
|
6
6
|
var _CredentialsProvider = require('next-auth/providers/credentials');
|
|
@@ -11,12 +11,12 @@ var _CredentialsProvider__default = /*#__PURE__*/_interopDefault(_CredentialsPro
|
|
|
11
11
|
|
|
12
12
|
// src/auth/seed-permissions.ts
|
|
13
13
|
async function seedAdministratorPermissions(dataSource, entityMap) {
|
|
14
|
-
const entities =
|
|
14
|
+
const entities = chunkX6UQFV4X_cjs.getPermissionableEntityKeys(entityMap);
|
|
15
15
|
const groupRepo = dataSource.getRepository(entityMap.user_groups);
|
|
16
16
|
const permRepo = dataSource.getRepository(entityMap.permissions);
|
|
17
17
|
const adminGroup = await groupRepo.findOne({
|
|
18
18
|
where: {
|
|
19
|
-
name:
|
|
19
|
+
name: chunkX6UQFV4X_cjs.ADMIN_GROUP_NAME,
|
|
20
20
|
deleted: false
|
|
21
21
|
}
|
|
22
22
|
});
|
|
@@ -299,18 +299,18 @@ async function checkMultiVendorEnabledViaSettingsApi() {
|
|
|
299
299
|
chunkUSNT2KNT_cjs.__name(checkMultiVendorEnabledViaSettingsApi, "checkMultiVendorEnabledViaSettingsApi");
|
|
300
300
|
function sessionUserFromNextAuthUser(user) {
|
|
301
301
|
const g = user.group;
|
|
302
|
-
const isRBACAdmin =
|
|
302
|
+
const isRBACAdmin = chunkX6UQFV4X_cjs.isSuperAdmin({
|
|
303
303
|
groupId: user.groupId ?? void 0,
|
|
304
304
|
groupName: g?.name,
|
|
305
305
|
isRBACAdmin: false
|
|
306
306
|
});
|
|
307
|
-
const entityPerms =
|
|
307
|
+
const entityPerms = chunkX6UQFV4X_cjs.permissionRowsToRecord(g?.permissions);
|
|
308
308
|
const rawAdminAccess = user.adminAccess;
|
|
309
309
|
const adminAccess = rawAdminAccess === true ? true : rawAdminAccess === false ? false : void 0;
|
|
310
310
|
const vendorIds = user.vendorIds ?? [];
|
|
311
311
|
const vendorRole = user.vendorRole ?? null;
|
|
312
312
|
const isVendorRoleOwner = user.isVendorRoleOwner ?? false;
|
|
313
|
-
const { isVendorPortal, isVendorOwner: isVendorOwner2 } =
|
|
313
|
+
const { isVendorPortal, isVendorOwner: isVendorOwner2 } = chunkX6UQFV4X_cjs.vendorPortalFlagsFromUser({
|
|
314
314
|
email: user.email,
|
|
315
315
|
isRBACAdmin,
|
|
316
316
|
groupName: g?.name,
|