rez_core 6.5.50 → 6.5.52
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/.claude/settings.local.json +26 -0
- package/.idea/250218_nodejs_core.iml +9 -0
- package/.idea/codeStyles/Project.xml +59 -0
- package/.idea/codeStyles/codeStyleConfig.xml +5 -0
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/misc.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/prettier.xml +6 -0
- package/.idea/vcs.xml +6 -0
- package/dist/app.module.js +5 -3
- package/dist/app.module.js.map +1 -1
- package/dist/constant/status.constant.d.ts +4 -0
- package/dist/constant/status.constant.js +9 -0
- package/dist/constant/status.constant.js.map +1 -0
- package/dist/core.module.js +63 -38
- package/dist/core.module.js.map +1 -1
- package/dist/module/app_master/app-master.module.d.ts +2 -0
- package/dist/module/app_master/app-master.module.js +28 -0
- package/dist/module/app_master/app-master.module.js.map +1 -0
- package/dist/module/app_master/controller/app-master.controller.js.map +1 -0
- package/dist/module/app_master/entity/app-master.entity.d.ts +17 -0
- package/dist/module/{meta → app_master}/entity/app-master.entity.js +30 -12
- package/dist/module/app_master/entity/app-master.entity.js.map +1 -0
- package/dist/module/{meta → app_master}/repository/app-master.repository.d.ts +2 -2
- package/dist/module/{meta → app_master}/repository/app-master.repository.js +4 -4
- package/dist/module/app_master/repository/app-master.repository.js.map +1 -0
- package/dist/module/app_master/service/app-master.service.js.map +1 -0
- package/dist/module/auth/strategies/jwt.strategy.d.ts +2 -1
- package/dist/module/auth/strategies/jwt.strategy.js +3 -2
- package/dist/module/auth/strategies/jwt.strategy.js.map +1 -1
- package/dist/module/dashboard/dashboard.module.js +1 -1
- package/dist/module/dashboard/dashboard.module.js.map +1 -1
- package/dist/module/dashboard/service/dashboard.service.js +1 -2
- package/dist/module/dashboard/service/dashboard.service.js.map +1 -1
- package/dist/module/enterprise/controller/enterprise.controller.d.ts +12 -0
- package/dist/module/enterprise/controller/enterprise.controller.js +57 -0
- package/dist/module/enterprise/controller/enterprise.controller.js.map +1 -0
- package/dist/module/enterprise/controller/meta.controller.d.ts +9 -0
- package/dist/module/enterprise/controller/meta.controller.js +43 -0
- package/dist/module/enterprise/controller/meta.controller.js.map +1 -0
- package/dist/module/enterprise/controller/organization.controller.d.ts +12 -4
- package/dist/module/enterprise/controller/organization.controller.js +64 -8
- package/dist/module/enterprise/controller/organization.controller.js.map +1 -1
- package/dist/module/enterprise/enterprise.module.js +10 -15
- package/dist/module/enterprise/enterprise.module.js.map +1 -1
- package/dist/module/enterprise/entity/enterprise.entity.d.ts +1 -3
- package/dist/module/enterprise/entity/enterprise.entity.js +4 -12
- package/dist/module/enterprise/entity/enterprise.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization-app-mapping.entity.d.ts +6 -1
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js +21 -4
- package/dist/module/enterprise/entity/organization-app-mapping.entity.js.map +1 -1
- package/dist/module/enterprise/entity/organization.entity.d.ts +3 -18
- package/dist/module/enterprise/entity/organization.entity.js +8 -74
- package/dist/module/enterprise/entity/organization.entity.js.map +1 -1
- package/dist/module/enterprise/repository/enterprise.repository.d.ts +4 -2
- package/dist/module/enterprise/repository/enterprise.repository.js +19 -4
- package/dist/module/enterprise/repository/enterprise.repository.js.map +1 -1
- package/dist/module/enterprise/service/brand-profile.service.d.ts +0 -0
- package/dist/module/enterprise/service/brand-profile.service.js +1 -0
- package/dist/module/enterprise/service/brand-profile.service.js.map +1 -0
- package/dist/module/enterprise/service/brand.service.d.ts +0 -3
- package/dist/module/enterprise/service/brand.service.js +0 -17
- package/dist/module/enterprise/service/brand.service.js.map +1 -1
- package/dist/module/enterprise/service/enterprise.service.d.ts +2 -2
- package/dist/module/enterprise/service/enterprise.service.js +4 -4
- package/dist/module/enterprise/service/enterprise.service.js.map +1 -1
- package/dist/module/enterprise/service/organization.service.d.ts +4 -4
- package/dist/module/enterprise/service/organization.service.js +101 -24
- package/dist/module/enterprise/service/organization.service.js.map +1 -1
- package/dist/module/enterprise/service/populate-meta.service.d.ts +9 -0
- package/dist/module/{meta → enterprise}/service/populate-meta.service.js +2 -8
- package/dist/module/enterprise/service/populate-meta.service.js.map +1 -0
- package/dist/module/enterprise/service/school.service.d.ts +0 -0
- package/dist/module/enterprise/service/school.service.js +1 -0
- package/dist/module/enterprise/service/school.service.js.map +1 -0
- package/dist/module/entity_json/controller/entity_json.controller.d.ts +9 -2
- package/dist/module/entity_json/controller/entity_json.controller.js.map +1 -1
- package/dist/module/entity_json/entity/entityJson.entity.d.ts +1 -2
- package/dist/module/entity_json/entity/entityJson.entity.js +1 -5
- package/dist/module/entity_json/entity/entityJson.entity.js.map +1 -1
- package/dist/module/entity_json/entity_json.module.js +2 -7
- package/dist/module/entity_json/entity_json.module.js.map +1 -1
- package/dist/module/entity_json/service/entity_json.service.d.ts +10 -2
- package/dist/module/entity_json/service/entity_json.service.js +25 -101
- package/dist/module/entity_json/service/entity_json.service.js.map +1 -1
- package/dist/module/filter/controller/filter.controller.d.ts +0 -12
- package/dist/module/filter/controller/filter.controller.js +1 -1
- package/dist/module/filter/controller/filter.controller.js.map +1 -1
- package/dist/module/filter/filter.module.js +2 -11
- package/dist/module/filter/filter.module.js.map +1 -1
- package/dist/module/filter/service/filter.service.d.ts +2 -38
- package/dist/module/filter/service/filter.service.js +50 -43
- package/dist/module/filter/service/filter.service.js.map +1 -1
- package/dist/module/filter/service/saved-filter.service.d.ts +2 -3
- package/dist/module/filter/service/saved-filter.service.js +18 -14
- package/dist/module/filter/service/saved-filter.service.js.map +1 -1
- package/dist/module/integration/service/integration.service.d.ts +0 -1
- package/dist/module/integration/service/integration.service.js +1 -2
- package/dist/module/integration/service/integration.service.js.map +1 -1
- package/dist/module/integration/service/wrapper.service.js +0 -1
- package/dist/module/integration/service/wrapper.service.js.map +1 -1
- package/dist/module/layout/controller/layout.controller.d.ts +1 -3
- package/dist/module/layout/controller/layout.controller.js +3 -7
- package/dist/module/layout/controller/layout.controller.js.map +1 -1
- package/dist/module/layout/entity/header-section.entity.d.ts +0 -2
- package/dist/module/layout/entity/header-section.entity.js +0 -8
- package/dist/module/layout/entity/header-section.entity.js.map +1 -1
- package/dist/module/layout/layout.module.js +1 -2
- package/dist/module/layout/layout.module.js.map +1 -1
- package/dist/module/layout/repository/header-section.repository.d.ts +0 -1
- package/dist/module/layout/repository/header-section.repository.js +0 -5
- package/dist/module/layout/repository/header-section.repository.js.map +1 -1
- package/dist/module/layout/service/header-section.service.d.ts +1 -1
- package/dist/module/layout/service/header-section.service.js +1 -1
- package/dist/module/layout/service/header-section.service.js.map +1 -1
- package/dist/module/linked_attributes/controller/linked_attributes.controller.d.ts +0 -41
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js +0 -90
- package/dist/module/linked_attributes/controller/linked_attributes.controller.js.map +1 -1
- package/dist/module/linked_attributes/linked_attributes.module.js +1 -8
- package/dist/module/linked_attributes/linked_attributes.module.js.map +1 -1
- package/dist/module/linked_attributes/service/linked_attributes.service.d.ts +1 -65
- package/dist/module/linked_attributes/service/linked_attributes.service.js +2 -287
- package/dist/module/linked_attributes/service/linked_attributes.service.js.map +1 -1
- package/dist/module/listmaster/service/list-master.service.js +1 -8
- package/dist/module/listmaster/service/list-master.service.js.map +1 -1
- package/dist/module/meta/controller/meta.controller.d.ts +1 -6
- package/dist/module/meta/controller/meta.controller.js +1 -19
- package/dist/module/meta/controller/meta.controller.js.map +1 -1
- package/dist/module/meta/entity/entity-master.entity.d.ts +0 -1
- package/dist/module/meta/entity/entity-master.entity.js +1 -8
- package/dist/module/meta/entity/entity-master.entity.js.map +1 -1
- package/dist/module/meta/entity.module.js +3 -14
- package/dist/module/meta/entity.module.js.map +1 -1
- package/dist/module/meta/service/attribute-master.service.d.ts +1 -6
- package/dist/module/meta/service/attribute-master.service.js +2 -22
- package/dist/module/meta/service/attribute-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-master.service.js +0 -1
- package/dist/module/meta/service/entity-master.service.js.map +1 -1
- package/dist/module/meta/service/entity-relation.service.d.ts +3 -4
- package/dist/module/meta/service/entity-relation.service.js +4 -10
- package/dist/module/meta/service/entity-relation.service.js.map +1 -1
- package/dist/module/meta/service/entity-service-impl.service.d.ts +1 -1
- package/dist/module/meta/service/entity-service-impl.service.js +10 -14
- package/dist/module/meta/service/entity-service-impl.service.js.map +1 -1
- package/dist/module/meta/service/entity-table.service.d.ts +4 -5
- package/dist/module/meta/service/entity-table.service.js +24 -45
- package/dist/module/meta/service/entity-table.service.js.map +1 -1
- package/dist/module/meta/service/resolver.service.d.ts +1 -1
- package/dist/module/meta/service/resolver.service.js +3 -6
- package/dist/module/meta/service/resolver.service.js.map +1 -1
- package/dist/module/module/controller/module-access.controller.d.ts +3 -4
- package/dist/module/module/controller/module-access.controller.js +13 -8
- package/dist/module/module/controller/module-access.controller.js.map +1 -1
- package/dist/module/module/entity/menu.entity.d.ts +6 -3
- package/dist/module/module/entity/menu.entity.js +19 -10
- package/dist/module/module/entity/menu.entity.js.map +1 -1
- package/dist/module/module/entity/module-access.entity.d.ts +15 -1
- package/dist/module/module/entity/module-access.entity.js +49 -3
- package/dist/module/module/entity/module-access.entity.js.map +1 -1
- package/dist/module/module/entity/module-action.entity.d.ts +4 -2
- package/dist/module/module/entity/module-action.entity.js +11 -6
- package/dist/module/module/entity/module-action.entity.js.map +1 -1
- package/dist/module/module/entity/module.entity.d.ts +3 -5
- package/dist/module/module/entity/module.entity.js +8 -18
- package/dist/module/module/entity/module.entity.js.map +1 -1
- package/dist/module/module/module.module.d.ts +1 -1
- package/dist/module/module/module.module.js +5 -7
- package/dist/module/module/module.module.js.map +1 -1
- package/dist/module/module/repository/menu.repository.d.ts +3 -3
- package/dist/module/module/repository/menu.repository.js +38 -27
- package/dist/module/module/repository/menu.repository.js.map +1 -1
- package/dist/module/module/repository/module-access.repository.d.ts +6 -6
- package/dist/module/module/repository/module-access.repository.js +96 -48
- package/dist/module/module/repository/module-access.repository.js.map +1 -1
- package/dist/module/module/service/menu.service.d.ts +2 -4
- package/dist/module/module/service/menu.service.js +7 -10
- package/dist/module/module/service/menu.service.js.map +1 -1
- package/dist/module/module/service/module-access.service.d.ts +7 -10
- package/dist/module/module/service/module-access.service.js +22 -24
- package/dist/module/module/service/module-access.service.js.map +1 -1
- package/dist/module/notification/entity/notification.entity.d.ts +17 -2
- package/dist/module/notification/entity/notification.entity.js +68 -2
- package/dist/module/notification/entity/notification.entity.js.map +1 -1
- package/dist/module/notification/notification.module.js +0 -2
- package/dist/module/notification/notification.module.js.map +1 -1
- package/dist/module/notification/service/notification.service.d.ts +1 -3
- package/dist/module/notification/service/notification.service.js +2 -5
- package/dist/module/notification/service/notification.service.js.map +1 -1
- package/dist/module/notification/service/otp.service.js +0 -1
- package/dist/module/notification/service/otp.service.js.map +1 -1
- package/dist/module/user/controller/login.controller.d.ts +1 -3
- package/dist/module/user/controller/login.controller.js +2 -6
- package/dist/module/user/controller/login.controller.js.map +1 -1
- package/dist/module/user/controller/user.controller.d.ts +0 -2
- package/dist/module/user/controller/user.controller.js +0 -13
- package/dist/module/user/controller/user.controller.js.map +1 -1
- package/dist/module/user/dto/create-user.dto.d.ts +6 -3
- package/dist/module/user/dto/create-user.dto.js +17 -11
- package/dist/module/user/dto/create-user.dto.js.map +1 -1
- package/dist/module/user/entity/role.entity.d.ts +18 -6
- package/dist/module/user/entity/role.entity.js +64 -19
- package/dist/module/user/entity/role.entity.js.map +1 -1
- package/dist/module/user/entity/user-role-mapping.entity.d.ts +10 -0
- package/dist/module/user/entity/user-role-mapping.entity.js +33 -1
- package/dist/module/user/entity/user-role-mapping.entity.js.map +1 -1
- package/dist/module/user/entity/user-session.entity.d.ts +0 -2
- package/dist/module/user/entity/user-session.entity.js +2 -20
- package/dist/module/user/entity/user-session.entity.js.map +1 -1
- package/dist/module/user/entity/user.entity.d.ts +17 -5
- package/dist/module/user/entity/user.entity.js +61 -15
- package/dist/module/user/entity/user.entity.js.map +1 -1
- package/dist/module/user/repository/role.repository.d.ts +7 -2
- package/dist/module/user/repository/role.repository.js +23 -8
- package/dist/module/user/repository/role.repository.js.map +1 -1
- package/dist/module/user/repository/user-role-mapping.repository.d.ts +1 -0
- package/dist/module/user/repository/user-role-mapping.repository.js +3 -0
- package/dist/module/user/repository/user-role-mapping.repository.js.map +1 -1
- package/dist/module/user/repository/user.repository.d.ts +5 -2
- package/dist/module/user/repository/user.repository.js +26 -7
- package/dist/module/user/repository/user.repository.js.map +1 -1
- package/dist/module/user/repository/userSession.repository.d.ts +1 -0
- package/dist/module/user/repository/userSession.repository.js +3 -0
- package/dist/module/user/repository/userSession.repository.js.map +1 -1
- package/dist/module/user/service/login.service.d.ts +3 -5
- package/dist/module/user/service/login.service.js +43 -42
- package/dist/module/user/service/login.service.js.map +1 -1
- package/dist/module/user/service/role.service.d.ts +24 -11
- package/dist/module/user/service/role.service.js +54 -40
- package/dist/module/user/service/role.service.js.map +1 -1
- package/dist/module/user/service/user-role-mapping.service.d.ts +2 -0
- package/dist/module/user/service/user-role-mapping.service.js +6 -0
- package/dist/module/user/service/user-role-mapping.service.js.map +1 -1
- package/dist/module/user/service/user-session.service.d.ts +3 -4
- package/dist/module/user/service/user-session.service.js +10 -11
- package/dist/module/user/service/user-session.service.js.map +1 -1
- package/dist/module/user/service/user.service.d.ts +33 -22
- package/dist/module/user/service/user.service.js +66 -58
- package/dist/module/user/service/user.service.js.map +1 -1
- package/dist/module/user/user.module.js +2 -7
- package/dist/module/user/user.module.js.map +1 -1
- package/dist/module/workflow/repository/action-data.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action-data.repository.js +6 -8
- package/dist/module/workflow/repository/action-data.repository.js.map +1 -1
- package/dist/module/workflow/repository/action.repository.d.ts +1 -1
- package/dist/module/workflow/repository/action.repository.js +10 -10
- package/dist/module/workflow/repository/action.repository.js.map +1 -1
- package/dist/module/workflow/repository/form-master.repository.d.ts +1 -1
- package/dist/module/workflow/repository/form-master.repository.js +2 -2
- package/dist/module/workflow/repository/form-master.repository.js.map +1 -1
- package/dist/module/workflow/service/action-data.service.js +1 -2
- package/dist/module/workflow/service/action-data.service.js.map +1 -1
- package/dist/module/workflow/service/action.service.js +2 -2
- package/dist/module/workflow/service/action.service.js.map +1 -1
- package/dist/module/workflow/service/comm-template.service.js +0 -2
- package/dist/module/workflow/service/comm-template.service.js.map +1 -1
- package/dist/module/workflow/service/entity-modification.service.js +0 -1
- package/dist/module/workflow/service/entity-modification.service.js.map +1 -1
- package/dist/module/workflow/service/form-master.service.js +2 -2
- package/dist/module/workflow/service/form-master.service.js.map +1 -1
- package/dist/module/workflow/service/populate-workflow.service.d.ts +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js +1 -1
- package/dist/module/workflow/service/populate-workflow.service.js.map +1 -1
- package/dist/module/workflow/service/task.service.js +0 -3
- package/dist/module/workflow/service/task.service.js.map +1 -1
- package/dist/module/workflow/service/workflow-meta.service.js +2 -7
- package/dist/module/workflow/service/workflow-meta.service.js.map +1 -1
- package/dist/module/workflow/service/workflow.service.js +2 -2
- package/dist/module/workflow/service/workflow.service.js.map +1 -1
- package/dist/module/workflow/workflow.module.js +2 -0
- package/dist/module/workflow/workflow.module.js.map +1 -1
- package/dist/module/workflow-automation/service/workflow-automation.service.js +11 -6
- package/dist/module/workflow-automation/service/workflow-automation.service.js.map +1 -1
- package/dist/module/workflow-automation/workflow-automation.module.js +3 -1
- package/dist/module/workflow-automation/workflow-automation.module.js.map +1 -1
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js +0 -2
- package/dist/module/workflow-schedule/service/workflow-schedule.service.js.map +1 -1
- package/dist/table.config.d.ts +3 -5
- package/dist/table.config.js +3 -3
- package/dist/table.config.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +2 -2
- package/server.log +850 -0
- package/src/app.module.ts +7 -5
- package/src/constant/status.constant.ts +4 -0
- package/src/core.module.ts +58 -44
- package/src/module/app_master/app-master.module.ts +15 -0
- package/src/module/{meta → app_master}/entity/app-master.entity.ts +22 -9
- package/src/module/{meta → app_master}/repository/app-master.repository.ts +3 -3
- package/src/module/auth/strategies/jwt.strategy.ts +4 -2
- package/src/module/dashboard/dashboard.module.ts +3 -3
- package/src/module/dashboard/service/dashboard.service.ts +1 -2
- package/src/module/enterprise/controller/enterprise.controller.ts +40 -0
- package/src/module/enterprise/controller/meta.controller.ts +23 -0
- package/src/module/enterprise/controller/organization.controller.ts +60 -4
- package/src/module/enterprise/enterprise.module.ts +16 -18
- package/src/module/enterprise/entity/enterprise.entity.ts +5 -11
- package/src/module/enterprise/entity/organization-app-mapping.entity.ts +18 -4
- package/src/module/enterprise/entity/organization.entity.ts +9 -59
- package/src/module/enterprise/repository/enterprise.repository.ts +26 -4
- package/src/module/enterprise/service/brand-profile.service.ts +10 -0
- package/src/module/enterprise/service/brand.service.ts +75 -5
- package/src/module/enterprise/service/enterprise.service.ts +10 -4
- package/src/module/enterprise/service/organization.service.ts +140 -23
- package/src/module/{meta → enterprise}/service/populate-meta.service.ts +2 -5
- package/src/module/enterprise/service/school.service.ts +5 -0
- package/src/module/entity_json/controller/entity_json.controller.ts +0 -13
- package/src/module/entity_json/entity/entityJson.entity.ts +1 -4
- package/src/module/entity_json/entity_json.module.ts +5 -9
- package/src/module/entity_json/service/entity_json.service.ts +51 -237
- package/src/module/filter/controller/filter.controller.ts +3 -1
- package/src/module/filter/filter.module.ts +3 -12
- package/src/module/filter/service/filter.service.ts +73 -130
- package/src/module/filter/service/saved-filter.service.ts +26 -16
- package/src/module/integration/service/integration.service.ts +2 -6
- package/src/module/integration/service/wrapper.service.ts +0 -1
- package/src/module/layout/controller/layout.controller.ts +1 -8
- package/src/module/layout/entity/header-section.entity.ts +0 -6
- package/src/module/layout/layout.module.ts +1 -1
- package/src/module/layout/repository/header-section.repository.ts +0 -6
- package/src/module/layout/service/header-section.service.ts +1 -1
- package/src/module/linked_attributes/controller/linked_attributes.controller.ts +0 -100
- package/src/module/linked_attributes/linked_attributes.module.ts +2 -9
- package/src/module/linked_attributes/service/linked_attributes.service.ts +3 -578
- package/src/module/listmaster/service/list-master.service.ts +1 -9
- package/src/module/meta/controller/meta.controller.ts +3 -25
- package/src/module/meta/entity/entity-master.entity.ts +3 -9
- package/src/module/meta/entity.module.ts +6 -20
- package/src/module/meta/service/attribute-master.service.ts +1 -31
- package/src/module/meta/service/entity-master.service.ts +0 -1
- package/src/module/meta/service/entity-relation.service.ts +6 -10
- package/src/module/meta/service/entity-service-impl.service.ts +19 -14
- package/src/module/meta/service/entity-table.service.ts +68 -82
- package/src/module/meta/service/entity.service.ts +1 -0
- package/src/module/meta/service/resolver.service.ts +0 -4
- package/src/module/module/controller/module-access.controller.ts +14 -9
- package/src/module/module/entity/menu.entity.ts +18 -10
- package/src/module/module/entity/module-access.entity.ts +40 -3
- package/src/module/module/entity/module-action.entity.ts +10 -6
- package/src/module/module/entity/module.entity.ts +7 -14
- package/src/module/module/module.module.ts +2 -3
- package/src/module/module/repository/menu.repository.ts +43 -29
- package/src/module/module/repository/module-access.repository.ts +111 -63
- package/src/module/module/service/menu.service.ts +7 -9
- package/src/module/module/service/module-access.service.ts +22 -34
- package/src/module/notification/entity/notification.entity.ts +53 -3
- package/src/module/notification/notification.module.ts +0 -2
- package/src/module/notification/service/notification.service.ts +0 -1
- package/src/module/notification/service/otp.service.ts +4 -3
- package/src/module/user/controller/login.controller.ts +7 -8
- package/src/module/user/controller/user.controller.ts +0 -9
- package/src/module/user/dto/create-user.dto.ts +19 -6
- package/src/module/user/entity/role.entity.ts +59 -16
- package/src/module/user/entity/user-role-mapping.entity.ts +29 -3
- package/src/module/user/entity/user-session.entity.ts +3 -19
- package/src/module/user/entity/user.entity.ts +48 -13
- package/src/module/user/repository/role.repository.ts +32 -12
- package/src/module/user/repository/user-role-mapping.repository.ts +5 -1
- package/src/module/user/repository/user.repository.ts +36 -9
- package/src/module/user/repository/userSession.repository.ts +5 -1
- package/src/module/user/service/login.service.ts +47 -51
- package/src/module/user/service/role.service.ts +64 -63
- package/src/module/user/service/user-role-mapping.service.ts +23 -1
- package/src/module/user/service/user-session.service.ts +14 -11
- package/src/module/user/service/user.service.ts +76 -95
- package/src/module/user/user.module.ts +4 -5
- package/src/module/workflow/repository/action-data.repository.ts +6 -8
- package/src/module/workflow/repository/action.repository.ts +11 -11
- package/src/module/workflow/repository/form-master.repository.ts +2 -2
- package/src/module/workflow/service/action-data.service.ts +3 -2
- package/src/module/workflow/service/action.service.ts +2 -2
- package/src/module/workflow/service/comm-template.service.ts +0 -2
- package/src/module/workflow/service/entity-modification.service.ts +0 -1
- package/src/module/workflow/service/form-master.service.ts +2 -2
- package/src/module/workflow/service/populate-workflow.service.ts +1 -1
- package/src/module/workflow/service/task.service.ts +0 -3
- package/src/module/workflow/service/workflow-meta.service.ts +2 -7
- package/src/module/workflow/service/workflow.service.ts +2 -2
- package/src/module/workflow/workflow.module.ts +2 -0
- package/src/module/workflow-automation/service/workflow-automation.service.ts +19 -7
- package/src/module/workflow-automation/workflow-automation.module.ts +4 -3
- package/src/module/workflow-schedule/service/workflow-schedule.service.ts +0 -2
- package/src/resources/dev.properties.yaml +2 -2
- package/src/table.config.ts +3 -3
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.d.ts +0 -6
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js +0 -32
- package/dist/migrations/1732612800000-AddEntityJsonGinIndex.js.map +0 -1
- package/dist/module/filter/service/flatjson-filter.service.d.ts +0 -32
- package/dist/module/filter/service/flatjson-filter.service.js +0 -632
- package/dist/module/filter/service/flatjson-filter.service.js.map +0 -1
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.d.ts +0 -13
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js +0 -64
- package/dist/module/linked_attributes/dto/create-linked-attribute-smart.dto.js.map +0 -1
- package/dist/module/meta/controller/app-master.controller.js.map +0 -1
- package/dist/module/meta/entity/app-master.entity.d.ts +0 -13
- package/dist/module/meta/entity/app-master.entity.js.map +0 -1
- package/dist/module/meta/repository/app-master.repository.js.map +0 -1
- package/dist/module/meta/service/app-master.service.js.map +0 -1
- package/dist/module/meta/service/populate-meta.service.d.ts +0 -13
- package/dist/module/meta/service/populate-meta.service.js.map +0 -1
- package/src/migrations/1732612800000-AddEntityJsonGinIndex.ts +0 -41
- package/src/module/entity_json/docs/FlatJson_Filterin_System.md +0 -2804
- package/src/module/filter/service/flatjson-filter.service.ts +0 -903
- package/src/module/filter/test/flatjson-filter.service.spec.ts +0 -415
- package/src/module/linked_attributes/dto/create-linked-attribute-smart.dto.ts +0 -54
- package/src/module/linked_attributes/test/linked-attributes.service.spec.ts +0 -244
- /package/dist/module/{meta → app_master}/controller/app-master.controller.d.ts +0 -0
- /package/dist/module/{meta → app_master}/controller/app-master.controller.js +0 -0
- /package/dist/module/{meta → app_master}/service/app-master.service.d.ts +0 -0
- /package/dist/module/{meta → app_master}/service/app-master.service.js +0 -0
- /package/src/module/{meta → app_master}/controller/app-master.controller.ts +0 -0
- /package/src/module/{meta → app_master}/service/app-master.service.ts +0 -0
|
@@ -27,59 +27,68 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
|
|
|
27
27
|
this.reflectionHelper = reflectionHelper;
|
|
28
28
|
this.moduleAccessRepo = moduleAccessRepo;
|
|
29
29
|
}
|
|
30
|
-
async getUserRoles(userId,
|
|
30
|
+
async getUserRoles(userId, app_id) {
|
|
31
31
|
const userRoleMappingRepo = this.reflectionHelper.getRepoService('UserRoleMapping');
|
|
32
32
|
const roles = await userRoleMappingRepo
|
|
33
33
|
.createQueryBuilder('urm')
|
|
34
34
|
.innerJoin('sso_role', 'role', 'role.id = urm.role_id')
|
|
35
35
|
.select('urm.role_id', 'role_id')
|
|
36
36
|
.where('urm.user_id = :userId', { userId })
|
|
37
|
-
.andWhere('role.
|
|
37
|
+
.andWhere('role.app_id = :app_id', { app_id })
|
|
38
38
|
.getRawMany();
|
|
39
39
|
return roles.map((r) => r.role_id);
|
|
40
40
|
}
|
|
41
|
-
async getAccessibleModules(roleIds,
|
|
42
|
-
const
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
const codes = roleCodes.map((r) => r.code);
|
|
49
|
-
if (codes.length === 0)
|
|
50
|
-
return [];
|
|
41
|
+
async getAccessibleModules(roleIds, appcode) {
|
|
42
|
+
const appMasterRepo = this.reflectionHelper.getRepoService('AppMaster');
|
|
43
|
+
const appMaster = await appMasterRepo.findOne({
|
|
44
|
+
where: {
|
|
45
|
+
code: appcode
|
|
46
|
+
}
|
|
47
|
+
});
|
|
51
48
|
const modules = await this.moduleAccessRepo
|
|
52
49
|
.createQueryBuilder('moduleAccess')
|
|
53
|
-
.select('moduleAccess.
|
|
54
|
-
.where('moduleAccess.
|
|
50
|
+
.select('moduleAccess.module_id')
|
|
51
|
+
.where('moduleAccess.role_id IN (:...roleIds)', { roleIds })
|
|
55
52
|
.andWhere('moduleAccess.access_flag > 0')
|
|
56
|
-
.andWhere('
|
|
53
|
+
.andWhere('moduleAccess.app_id = :app_id', { app_id: appMaster.id })
|
|
57
54
|
.getMany();
|
|
58
|
-
return Array.from(new Set(modules.map((module) => module.
|
|
55
|
+
return Array.from(new Set(modules.map((module) => module.module_id)));
|
|
59
56
|
}
|
|
60
|
-
async getMenuItems(
|
|
57
|
+
async getMenuItems(modules, appcode, levelType) {
|
|
58
|
+
const appMasterRepo = this.reflectionHelper.getRepoService('AppMaster');
|
|
59
|
+
const appMaster = await appMasterRepo.findOne({
|
|
60
|
+
where: {
|
|
61
|
+
code: appcode
|
|
62
|
+
}
|
|
63
|
+
});
|
|
61
64
|
return await this.menuData
|
|
62
65
|
.createQueryBuilder('menu')
|
|
63
66
|
.leftJoin('sso_module', 'module', `
|
|
64
|
-
menu.
|
|
65
|
-
AND
|
|
67
|
+
menu.module_id = module.id
|
|
68
|
+
AND menu.app_id = module.app_id
|
|
66
69
|
AND menu.level_type = module.level_type
|
|
67
70
|
`)
|
|
68
|
-
.where('menu.
|
|
69
|
-
.andWhere('
|
|
71
|
+
.where('menu.module_id IN (:...modules)', { modules: modules })
|
|
72
|
+
.andWhere('menu.app_id = :app_id', { app_id: appMaster.id })
|
|
70
73
|
.andWhere('menu.level_type = :levelType', { levelType })
|
|
71
74
|
.andWhere('menu.ui_visible = 1')
|
|
72
75
|
.select([
|
|
73
76
|
'menu.*',
|
|
77
|
+
'module.module_code AS module_code',
|
|
74
78
|
'module.component_name AS component',
|
|
75
79
|
'module.title AS title',
|
|
76
80
|
'module.entity_type AS entity_type',
|
|
77
|
-
'module.type AS type'
|
|
78
|
-
'module.ui_config AS ui_config',
|
|
81
|
+
'module.type AS type'
|
|
79
82
|
])
|
|
80
83
|
.getRawMany();
|
|
81
84
|
}
|
|
82
85
|
async resolveUserRoles(userId, appcode, levelType, levelId) {
|
|
86
|
+
const appMasterRepo = this.reflectionHelper.getRepoService('AppMaster');
|
|
87
|
+
const appMaster = await appMasterRepo.findOne({
|
|
88
|
+
where: {
|
|
89
|
+
code: appcode
|
|
90
|
+
}
|
|
91
|
+
});
|
|
83
92
|
const repo = this.reflectionHelper.getRepoService('UserRoleMapping');
|
|
84
93
|
if (userId) {
|
|
85
94
|
const userRepo = this.reflectionHelper.getRepoService('UserData');
|
|
@@ -91,7 +100,9 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
|
|
|
91
100
|
const getUserUrm = await repo.findOne({
|
|
92
101
|
where: {
|
|
93
102
|
user_id: userId,
|
|
94
|
-
|
|
103
|
+
app: {
|
|
104
|
+
code: appcode
|
|
105
|
+
},
|
|
95
106
|
},
|
|
96
107
|
});
|
|
97
108
|
if (getUserDetails &&
|
|
@@ -107,7 +118,7 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
|
|
|
107
118
|
.where('urm.user_id = :userId', { userId: userId })
|
|
108
119
|
.andWhere('urm.level_type = :levelType', { levelType })
|
|
109
120
|
.andWhere('urm.level_id = :levelId', { levelId: levelId })
|
|
110
|
-
.andWhere('role.
|
|
121
|
+
.andWhere('role.app_id = :app_id', { app_id: appMaster.id })
|
|
111
122
|
.getRawMany();
|
|
112
123
|
if (roles.length)
|
|
113
124
|
return roles.map((r) => r.urm_role_id);
|
|
@@ -128,7 +139,7 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
|
|
|
128
139
|
.where('urm.user_id = :userId', { userId })
|
|
129
140
|
.andWhere('urm.level_type = :levelType', { levelType: 'BRN' })
|
|
130
141
|
.andWhere('urm.level_id = :levelId', { levelId: brandId })
|
|
131
|
-
.andWhere('role.
|
|
142
|
+
.andWhere('role.app_id = :app_id', { app_id: appMaster.id })
|
|
132
143
|
.getRawMany();
|
|
133
144
|
if (roles.length)
|
|
134
145
|
return roles.map((r) => r.urm_role_id);
|
|
@@ -141,7 +152,7 @@ let MenuRepository = class MenuRepository extends typeorm_1.Repository {
|
|
|
141
152
|
.where('urm.user_id = :userId', { userId })
|
|
142
153
|
.andWhere('urm.level_type = :levelType', { levelType: 'ORG' })
|
|
143
154
|
.andWhere('urm.level_id = :levelId', { levelId: orgId })
|
|
144
|
-
.andWhere('role.
|
|
155
|
+
.andWhere('role.app_id = :app_id', { app_id: appMaster.id })
|
|
145
156
|
.getRawMany();
|
|
146
157
|
if (roles.length)
|
|
147
158
|
return roles.map((r) => r.urm_role_id);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.repository.js","sourceRoot":"","sources":["../../../../src/module/module/repository/menu.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAiD;AACjD,uDAAiD;AACjD,yEAA8D;AAC9D,6CAAmD;AACnD,gGAAoF;AAG7E,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,oBAAoB;IACtD,YACmB,UAAsB,EACM,QAA8B,EAC1D,gBAAkC,EAElC,gBAA0C;QAE3D,KAAK,CAAC,sBAAQ,EAAE,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;QANjC,eAAU,GAAV,UAAU,CAAY;QACM,aAAQ,GAAR,QAAQ,CAAsB;QAC1D,qBAAgB,GAAhB,gBAAgB,CAAkB;QAElC,qBAAgB,GAAhB,gBAAgB,CAA0B;IAG7D,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"menu.repository.js","sourceRoot":"","sources":["../../../../src/module/module/repository/menu.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAA4C;AAC5C,qCAAiD;AACjD,uDAAiD;AACjD,yEAA8D;AAC9D,6CAAmD;AACnD,gGAAoF;AAG7E,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,oBAAoB;IACtD,YACmB,UAAsB,EACM,QAA8B,EAC1D,gBAAkC,EAElC,gBAA0C;QAE3D,KAAK,CAAC,sBAAQ,EAAE,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;QANjC,eAAU,GAAV,UAAU,CAAY;QACM,aAAQ,GAAR,QAAQ,CAAsB;QAC1D,qBAAgB,GAAhB,gBAAgB,CAAkB;QAElC,qBAAgB,GAAhB,gBAAgB,CAA0B;IAG7D,CAAC;IAED,KAAK,CAAC,YAAY,CAAC,MAAc,EAAE,MAAc;QAC/C,MAAM,mBAAmB,GACvB,IAAI,CAAC,gBAAgB,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;QAE1D,MAAM,KAAK,GAAG,MAAM,mBAAmB;aACpC,kBAAkB,CAAC,KAAK,CAAC;aACzB,SAAS,CAAC,UAAU,EAAE,MAAM,EAAE,uBAAuB,CAAC;aACtD,MAAM,CAAC,aAAa,EAAE,SAAS,CAAC;aAChC,KAAK,CAAC,uBAAuB,EAAE,EAAE,MAAM,EAAE,CAAC;aAC1C,QAAQ,CAAC,uBAAu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AA,0BAAgB,EAAC,sBAAQ,CAAC,CAAA;IAE1B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;qCAHF,oBAAU;QACgB,oBAAU;QAC9B,4CAAgB;QAEhB,oBAAU;GANpC,cAAc,CA+L1B"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { Repository
|
|
1
|
+
import { Repository } from 'typeorm';
|
|
2
2
|
import { Role } from 'src/module/user/entity/role.entity';
|
|
3
3
|
import { ModuleAccess } from '../entity/module-access.entity';
|
|
4
4
|
import { ModuleAction } from '../entity/module-action.entity';
|
|
5
5
|
import { ModuleData } from '../entity/module.entity';
|
|
6
|
+
import { ReflectionHelper } from '../../../utils/service/reflection-helper.service';
|
|
6
7
|
export declare class ModuleAccessRepository {
|
|
7
8
|
private readonly roleRepo;
|
|
8
9
|
private readonly moduleRepo;
|
|
9
10
|
private readonly moduleAccessRepo;
|
|
10
11
|
private readonly moduleActionRepo;
|
|
11
|
-
private readonly
|
|
12
|
-
constructor(roleRepo: Repository<Role>, moduleRepo: Repository<ModuleData>, moduleAccessRepo: Repository<ModuleAccess>, moduleActionRepo: Repository<ModuleAction>,
|
|
12
|
+
private readonly reflectionHelper;
|
|
13
|
+
constructor(roleRepo: Repository<Role>, moduleRepo: Repository<ModuleData>, moduleAccessRepo: Repository<ModuleAccess>, moduleActionRepo: Repository<ModuleAction>, reflectionHelper: ReflectionHelper);
|
|
13
14
|
getRoles({ appcode, level_type, level_id, }: {
|
|
14
15
|
appcode: string;
|
|
15
16
|
level_type?: string;
|
|
16
17
|
level_id?: number;
|
|
17
18
|
}): Promise<{
|
|
18
|
-
label:
|
|
19
|
-
value:
|
|
19
|
+
label: string;
|
|
20
|
+
value: number;
|
|
20
21
|
}[]>;
|
|
21
22
|
getModules({ appcode, loggedInUser, }: {
|
|
22
23
|
appcode: string;
|
|
@@ -39,7 +40,6 @@ export declare class ModuleAccessRepository {
|
|
|
39
40
|
getModuleUIConfig(moduleCode: string, roleIds: number[]): Promise<{
|
|
40
41
|
entity_type: string;
|
|
41
42
|
title: string;
|
|
42
|
-
ui_config: JSON;
|
|
43
43
|
action: string[];
|
|
44
44
|
}>;
|
|
45
45
|
getModuleAccessByRoles(roleIds: number[], appcode: string): Promise<{
|
|
@@ -20,30 +20,32 @@ const role_entity_1 = require("../../user/entity/role.entity");
|
|
|
20
20
|
const module_access_entity_1 = require("../entity/module-access.entity");
|
|
21
21
|
const module_action_entity_1 = require("../entity/module-action.entity");
|
|
22
22
|
const module_entity_1 = require("../entity/module.entity");
|
|
23
|
+
const reflection_helper_service_1 = require("../../../utils/service/reflection-helper.service");
|
|
23
24
|
let ModuleAccessRepository = class ModuleAccessRepository {
|
|
24
|
-
constructor(roleRepo, moduleRepo, moduleAccessRepo, moduleActionRepo,
|
|
25
|
+
constructor(roleRepo, moduleRepo, moduleAccessRepo, moduleActionRepo, reflectionHelper) {
|
|
25
26
|
this.roleRepo = roleRepo;
|
|
26
27
|
this.moduleRepo = moduleRepo;
|
|
27
28
|
this.moduleAccessRepo = moduleAccessRepo;
|
|
28
29
|
this.moduleActionRepo = moduleActionRepo;
|
|
29
|
-
this.
|
|
30
|
+
this.reflectionHelper = reflectionHelper;
|
|
30
31
|
}
|
|
31
32
|
async getRoles({ appcode, level_type, level_id, }) {
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
.
|
|
37
|
-
|
|
33
|
+
const where = {
|
|
34
|
+
app: {
|
|
35
|
+
code: appcode,
|
|
36
|
+
},
|
|
37
|
+
is_factory: (0, typeorm_2.Or)((0, typeorm_2.IsNull)(), (0, typeorm_2.Not)(1)),
|
|
38
|
+
};
|
|
38
39
|
if (level_type) {
|
|
39
|
-
|
|
40
|
+
where.level_type = level_type;
|
|
40
41
|
}
|
|
41
42
|
if (level_id !== undefined) {
|
|
42
|
-
|
|
43
|
-
level_id: String(level_id),
|
|
44
|
-
});
|
|
43
|
+
where.level_id = String(level_id);
|
|
45
44
|
}
|
|
46
|
-
const roles = await
|
|
45
|
+
const roles = await this.roleRepo.find({
|
|
46
|
+
where,
|
|
47
|
+
select: ['id', 'name'],
|
|
48
|
+
});
|
|
47
49
|
return roles.map((role) => ({
|
|
48
50
|
label: role.name,
|
|
49
51
|
value: role.id,
|
|
@@ -53,12 +55,22 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
53
55
|
let modules;
|
|
54
56
|
if (loggedInUser.level_type == 'SCH') {
|
|
55
57
|
modules = await this.moduleRepo.find({
|
|
56
|
-
where: {
|
|
58
|
+
where: {
|
|
59
|
+
module_level: 'MAINMOD',
|
|
60
|
+
app: {
|
|
61
|
+
code: appcode,
|
|
62
|
+
},
|
|
63
|
+
level_type: 'SCH',
|
|
64
|
+
},
|
|
57
65
|
});
|
|
58
66
|
}
|
|
59
67
|
else {
|
|
60
68
|
modules = await this.moduleRepo.find({
|
|
61
|
-
where: {
|
|
69
|
+
where: {
|
|
70
|
+
module_level: 'MAINMOD', app: {
|
|
71
|
+
code: appcode,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
62
74
|
});
|
|
63
75
|
}
|
|
64
76
|
return modules
|
|
@@ -81,7 +93,9 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
81
93
|
roles = await this.roleRepo.find({
|
|
82
94
|
where: {
|
|
83
95
|
id: (0, typeorm_2.In)(fetchedRoleIds),
|
|
84
|
-
|
|
96
|
+
app: {
|
|
97
|
+
code: appcode,
|
|
98
|
+
},
|
|
85
99
|
},
|
|
86
100
|
});
|
|
87
101
|
}
|
|
@@ -89,40 +103,59 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
89
103
|
roles = await this.roleRepo.find({
|
|
90
104
|
where: {
|
|
91
105
|
id: (0, typeorm_2.In)(roleIds.map((id) => Number(id))),
|
|
92
|
-
|
|
106
|
+
app: {
|
|
107
|
+
code: appcode,
|
|
108
|
+
},
|
|
93
109
|
},
|
|
94
110
|
});
|
|
95
111
|
}
|
|
96
112
|
if (!roles.length)
|
|
97
113
|
return [];
|
|
98
|
-
const roleCodes = roles.map((role) => role.code);
|
|
99
114
|
const moduleAccesses = await this.moduleAccessRepo.find({
|
|
100
115
|
where: {
|
|
101
|
-
|
|
102
|
-
|
|
116
|
+
role_id: (0, typeorm_2.In)(roles.map((role) => role.id)),
|
|
117
|
+
app: {
|
|
118
|
+
code: appcode,
|
|
119
|
+
},
|
|
120
|
+
level_type: levelType,
|
|
121
|
+
},
|
|
122
|
+
relations: {
|
|
123
|
+
app: true,
|
|
124
|
+
module: true,
|
|
103
125
|
},
|
|
104
126
|
});
|
|
105
127
|
return roles.map((role) => ({
|
|
106
|
-
|
|
128
|
+
role_id: role.id,
|
|
107
129
|
name: role.name,
|
|
108
130
|
permission: moduleAccesses
|
|
109
|
-
.filter((access) => access.
|
|
131
|
+
.filter((access) => access.role_id === role.id)
|
|
110
132
|
.map((access) => ({
|
|
111
133
|
action: access.action_type,
|
|
112
134
|
access: access.access_flag,
|
|
113
|
-
|
|
135
|
+
module_id: access.module_id,
|
|
114
136
|
level_type: access.level_type,
|
|
115
|
-
|
|
137
|
+
app_id: access.app_id,
|
|
138
|
+
code: access.module.module_code,
|
|
139
|
+
appcode: access.app.code,
|
|
116
140
|
})),
|
|
117
141
|
}));
|
|
118
142
|
}
|
|
119
143
|
async getAllModulesByLevel(mainModIds, appcode, levelType) {
|
|
144
|
+
const appMasterRepo = this.reflectionHelper.getRepoService('AppMaster');
|
|
145
|
+
const appMaster = await appMasterRepo.find({
|
|
146
|
+
where: {
|
|
147
|
+
code: appcode,
|
|
148
|
+
},
|
|
149
|
+
});
|
|
150
|
+
if (!appMaster) {
|
|
151
|
+
return {};
|
|
152
|
+
}
|
|
120
153
|
const mainModules = mainModIds.length === 1 && mainModIds[0] === '-1'
|
|
121
154
|
? await this.moduleRepo.find({
|
|
122
|
-
where: { module_level: 'MAINMOD',
|
|
155
|
+
where: { module_level: 'MAINMOD', app_id: appMaster[0].id },
|
|
123
156
|
})
|
|
124
157
|
: await this.moduleRepo.find({
|
|
125
|
-
where: { id: (0, typeorm_2.In)(mainModIds), module_level: 'MAINMOD', appcode },
|
|
158
|
+
where: { id: (0, typeorm_2.In)(mainModIds), module_level: 'MAINMOD', app: { code: appcode } },
|
|
126
159
|
});
|
|
127
160
|
if (!mainModules.length)
|
|
128
161
|
return {};
|
|
@@ -132,28 +165,28 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
132
165
|
.where(wbsCodes
|
|
133
166
|
.map((code) => `module.wbs_code LIKE :code${code}`)
|
|
134
167
|
.join(' OR '), Object.fromEntries(wbsCodes.map((code) => [`code${code}`, `${code}%`])))
|
|
135
|
-
.andWhere('module.
|
|
168
|
+
.andWhere('module.app_id = :app_id', { app_id: appMaster[0].id })
|
|
136
169
|
.andWhere('module.module_code != :excludedCode', {
|
|
137
170
|
excludedCode: 'all_organization_adm_org',
|
|
138
171
|
})
|
|
139
172
|
.getMany();
|
|
140
173
|
allModules = allModules.filter((mod) => mod.module_code != 'all_organization_adm_org');
|
|
141
|
-
const
|
|
174
|
+
const modules = allModules.map((m) => m.id);
|
|
142
175
|
const allActions = await this.moduleActionRepo.find({
|
|
143
|
-
where: {
|
|
176
|
+
where: { module_id: (0, typeorm_2.In)(modules) },
|
|
144
177
|
});
|
|
145
178
|
const actionMap = allActions.reduce((acc, action) => {
|
|
146
|
-
if (!acc[action.
|
|
147
|
-
acc[action.
|
|
179
|
+
if (!acc[action.module_id])
|
|
180
|
+
acc[action.module_id] = [];
|
|
148
181
|
const actionItem = {
|
|
149
|
-
action: action.
|
|
182
|
+
action: action.action_code,
|
|
150
183
|
name: action.action_name,
|
|
151
184
|
};
|
|
152
|
-
if (action.
|
|
153
|
-
acc[action.
|
|
185
|
+
if (action.action_code === 'VIEW') {
|
|
186
|
+
acc[action.module_id].unshift(actionItem);
|
|
154
187
|
}
|
|
155
188
|
else {
|
|
156
|
-
acc[action.
|
|
189
|
+
acc[action.module_id].push(actionItem);
|
|
157
190
|
}
|
|
158
191
|
return acc;
|
|
159
192
|
}, {});
|
|
@@ -167,6 +200,7 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
167
200
|
parentWbs.split('.').length + 1)
|
|
168
201
|
.map((mod) => ({
|
|
169
202
|
name: mod.name,
|
|
203
|
+
module_id: mod.id,
|
|
170
204
|
code: mod.module_code,
|
|
171
205
|
permission: actionMap[mod.module_code] || [],
|
|
172
206
|
submod: buildHierarchy(mod.wbs_code),
|
|
@@ -175,6 +209,7 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
175
209
|
.filter((mod) => mod.level_type === lvl)
|
|
176
210
|
.map((mod) => ({
|
|
177
211
|
name: mod.name,
|
|
212
|
+
module_id: mod.id,
|
|
178
213
|
code: mod.module_code,
|
|
179
214
|
permission: actionMap[mod.module_code] || [],
|
|
180
215
|
submod: buildHierarchy(mod.wbs_code),
|
|
@@ -190,10 +225,16 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
190
225
|
for (const access of accessList) {
|
|
191
226
|
const existing = await this.moduleAccessRepo.findOne({
|
|
192
227
|
where: {
|
|
193
|
-
|
|
194
|
-
|
|
228
|
+
role: {
|
|
229
|
+
code: access.role_code,
|
|
230
|
+
},
|
|
231
|
+
module: {
|
|
232
|
+
module_code: access.module_code,
|
|
233
|
+
},
|
|
195
234
|
action_type: access.action_type,
|
|
196
|
-
|
|
235
|
+
app: {
|
|
236
|
+
code: access.appcode,
|
|
237
|
+
},
|
|
197
238
|
level_type: access.level_type,
|
|
198
239
|
},
|
|
199
240
|
});
|
|
@@ -202,7 +243,7 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
202
243
|
await this.moduleAccessRepo.save(existing);
|
|
203
244
|
}
|
|
204
245
|
else {
|
|
205
|
-
await this.moduleAccessRepo.save(
|
|
246
|
+
await this.moduleAccessRepo.save(this.moduleAccessRepo.create(access));
|
|
206
247
|
}
|
|
207
248
|
}
|
|
208
249
|
return true;
|
|
@@ -218,12 +259,10 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
218
259
|
});
|
|
219
260
|
if (!module)
|
|
220
261
|
throw new common_1.BadRequestException('Module not found');
|
|
221
|
-
const roles = await this.roleRepo.find({ where: { id: (0, typeorm_2.In)(roleIds) } });
|
|
222
|
-
const roleCodes = roles.map((role) => role.code);
|
|
223
262
|
const actions = await this.moduleAccessRepo.find({
|
|
224
263
|
where: {
|
|
225
|
-
|
|
226
|
-
|
|
264
|
+
module_id: module.id,
|
|
265
|
+
role_id: (0, typeorm_2.In)(roleIds),
|
|
227
266
|
access_flag: 1,
|
|
228
267
|
},
|
|
229
268
|
});
|
|
@@ -231,7 +270,6 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
231
270
|
return {
|
|
232
271
|
entity_type: module.entity_type,
|
|
233
272
|
title: module.title,
|
|
234
|
-
ui_config: module.ui_config || {},
|
|
235
273
|
action: uniqueActions,
|
|
236
274
|
};
|
|
237
275
|
}
|
|
@@ -239,24 +277,34 @@ let ModuleAccessRepository = class ModuleAccessRepository {
|
|
|
239
277
|
const roles = await this.roleRepo.find({
|
|
240
278
|
where: {
|
|
241
279
|
id: (0, typeorm_2.In)(roleIds),
|
|
242
|
-
|
|
280
|
+
app: {
|
|
281
|
+
code: appcode,
|
|
282
|
+
},
|
|
243
283
|
},
|
|
244
284
|
select: ['id', 'code'],
|
|
245
285
|
});
|
|
246
286
|
const roleCodes = roles.map((r) => r.code);
|
|
247
287
|
if (!roleCodes.length)
|
|
248
288
|
return [];
|
|
289
|
+
const appMasterRepo = this.reflectionHelper.getRepoService('AppMaster');
|
|
290
|
+
const appMaster = await appMasterRepo.findOne({
|
|
291
|
+
where: {
|
|
292
|
+
code: appcode,
|
|
293
|
+
},
|
|
294
|
+
});
|
|
249
295
|
const accessRecords = await this.moduleAccessRepo
|
|
250
296
|
.createQueryBuilder('access')
|
|
251
297
|
.select([
|
|
252
|
-
'access.
|
|
298
|
+
'access.module_id AS module_id',
|
|
299
|
+
'm.module_code AS module_code',
|
|
253
300
|
'access.action_type AS action_type',
|
|
254
301
|
'access.access_flag AS access_flag',
|
|
255
302
|
'access.level_type AS level_type',
|
|
256
303
|
'access.appcode AS appcode',
|
|
257
304
|
])
|
|
305
|
+
.innerJoin('sso_module', 'm', 'm.id = access.module_id')
|
|
258
306
|
.where('access.role_code IN (:...roleCodes)', { roleCodes })
|
|
259
|
-
.andWhere('access.
|
|
307
|
+
.andWhere('access.app_id = :app_id', { app_id: appMaster.id })
|
|
260
308
|
.getRawMany();
|
|
261
309
|
return accessRecords.map((record) => ({
|
|
262
310
|
action: record.action_type,
|
|
@@ -278,6 +326,6 @@ exports.ModuleAccessRepository = ModuleAccessRepository = __decorate([
|
|
|
278
326
|
typeorm_2.Repository,
|
|
279
327
|
typeorm_2.Repository,
|
|
280
328
|
typeorm_2.Repository,
|
|
281
|
-
|
|
329
|
+
reflection_helper_service_1.ReflectionHelper])
|
|
282
330
|
], ModuleAccessRepository);
|
|
283
331
|
//# sourceMappingURL=module-access.repository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-access.repository.js","sourceRoot":"","sources":["../../../../src/module/module/repository/module-access.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qCAAkE;AAClE,+DAA0D;AAC1D,yEAA8D;AAC9D,yEAA8D;AAC9D,2DAAqD;AAG9C,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,QAA0B,EAG1B,UAAkC,EAGlC,gBAA0C,EAG1C,gBAA0C,EAE1C,UAAsB;QAXtB,aAAQ,GAAR,QAAQ,CAAkB;QAG1B,eAAU,GAAV,UAAU,CAAwB;QAGlC,qBAAgB,GAAhB,gBAAgB,CAA0B;QAG1C,qBAAgB,GAAhB,gBAAgB,CAA0B;QAE1C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,QAAQ,CAAC,EACb,OA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C,CAAC;YACpC,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,MAAM,EAAE,MAAM,CAAC,WAAW;YAC1B,IAAI,EAAE,MAAM,CAAC,WAAW;YACxB,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC,CAAC;IACN,CAAC;CACF,CAAA;AA9UY,wDAAsB;iCAAtB,sBAAsB;IADlC,IAAA,mBAAU,GAAE;IAGR,WAAA,IAAA,0BAAgB,EAAC,kBAAI,CAAC,CAAA;IAGtB,WAAA,IAAA,0BAAgB,EAAC,0BAAU,CAAC,CAAA;IAG5B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;IAG9B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;qCARJ,oBAAU;QAGR,oBAAU;QAGJ,oBAAU;QAGV,oBAAU;QAEhB,oBAAU;GAd9B,sBAAsB,CA8UlC"}
|
|
1
|
+
{"version":3,"file":"module-access.repository.js","sourceRoot":"","sources":["../../../../src/module/module/repository/module-access.repository.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAiE;AACjE,6CAAmD;AACnD,qCAA0D;AAC1D,+DAA0D;AAC1D,yEAA8D;AAC9D,yEAA8D;AAC9D,2DAAqD;AACrD,gGAAoF;AAG7E,IAAM,sBAAsB,GAA5B,MAAM,sBAAsB;IACjC,YAEmB,QAA0B,EAE1B,UAAkC,EAElC,gBAA0C,EAE1C,gBAA0C,EAC1C,gBAAkC;QAPlC,aAAQ,GAAR,QAAQ,CAAkB;QAE1B,eAAU,GAAV,UAAU,CAAwB;QAElC,qBAAgB,GAAhB,gBAAgB,CAA0B;QAE1C,qBAAgB,GAAhB,gBAAgB,CAA0B;QAC1C,qBAAgB,GAAhB,gBAAgB,CAAkB;IAErD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,EACE,OAAO,EACP,UAAU,EACV,QAAQ,GAKxB;QACC,MAAM,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gB,EAAC,mCAAY,CAAC,CAAA;IAE9B,WAAA,IAAA,0BAAgB,EAAC,mCAAY,CAAC,CAAA;qCALJ,oBAAU;QAER,oBAAU;QAEJ,oBAAU;QAEV,oBAAU;QACV,4CAAgB;GAV1C,sBAAsB,CA6XlC"}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { MenuRepository } from '../repository/menu.repository';
|
|
2
|
-
import { DataSource } from 'typeorm';
|
|
3
2
|
export declare class MenuService {
|
|
4
3
|
private readonly menuRepository;
|
|
5
|
-
|
|
6
|
-
constructor(menuRepository: MenuRepository, datasource: DataSource);
|
|
4
|
+
constructor(menuRepository: MenuRepository);
|
|
7
5
|
getUserMenu(userId: number, appcode: string, levelType: 'ORG' | 'SCH', levelId: number): Promise<{
|
|
8
6
|
menu: any[];
|
|
9
7
|
}>;
|
|
10
8
|
private buildMenuHierarchy;
|
|
11
|
-
getUserRoles(userId: number,
|
|
9
|
+
getUserRoles(userId: number, app_id: number): Promise<any>;
|
|
12
10
|
}
|
|
@@ -12,20 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.MenuService = void 0;
|
|
13
13
|
const common_1 = require("@nestjs/common");
|
|
14
14
|
const menu_repository_1 = require("../repository/menu.repository");
|
|
15
|
-
const typeorm_1 = require("typeorm");
|
|
16
15
|
let MenuService = class MenuService {
|
|
17
|
-
constructor(menuRepository
|
|
16
|
+
constructor(menuRepository) {
|
|
18
17
|
this.menuRepository = menuRepository;
|
|
19
|
-
this.datasource = datasource;
|
|
20
18
|
}
|
|
21
19
|
async getUserMenu(userId, appcode, levelType, levelId) {
|
|
22
20
|
const roleCodes = await this.menuRepository.resolveUserRoles(userId, appcode, levelType, levelId);
|
|
23
21
|
if (!roleCodes.length)
|
|
24
22
|
return { menu: [] };
|
|
25
|
-
const
|
|
26
|
-
if (!
|
|
23
|
+
const modules = await this.menuRepository.getAccessibleModules(roleCodes, appcode);
|
|
24
|
+
if (!modules.length)
|
|
27
25
|
return { menu: [] };
|
|
28
|
-
const menuItems = await this.menuRepository.getMenuItems(
|
|
26
|
+
const menuItems = await this.menuRepository.getMenuItems(modules, appcode, levelType);
|
|
29
27
|
const menuTree = this.buildMenuHierarchy(menuItems);
|
|
30
28
|
return { menu: menuTree };
|
|
31
29
|
}
|
|
@@ -46,14 +44,13 @@ let MenuService = class MenuService {
|
|
|
46
44
|
});
|
|
47
45
|
return rootMenu;
|
|
48
46
|
}
|
|
49
|
-
async getUserRoles(userId,
|
|
50
|
-
return this.menuRepository.getUserRoles(userId,
|
|
47
|
+
async getUserRoles(userId, app_id) {
|
|
48
|
+
return this.menuRepository.getUserRoles(userId, app_id);
|
|
51
49
|
}
|
|
52
50
|
};
|
|
53
51
|
exports.MenuService = MenuService;
|
|
54
52
|
exports.MenuService = MenuService = __decorate([
|
|
55
53
|
(0, common_1.Injectable)(),
|
|
56
|
-
__metadata("design:paramtypes", [menu_repository_1.MenuRepository
|
|
57
|
-
typeorm_1.DataSource])
|
|
54
|
+
__metadata("design:paramtypes", [menu_repository_1.MenuRepository])
|
|
58
55
|
], MenuService);
|
|
59
56
|
//# sourceMappingURL=menu.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/menu.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mEAA+D;
|
|
1
|
+
{"version":3,"file":"menu.service.js","sourceRoot":"","sources":["../../../../src/module/module/service/menu.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,mEAA+D;AAIxD,IAAM,WAAW,GAAjB,MAAM,WAAW;IACtB,YACmB,cAA8B;QAA9B,mBAAc,GAAd,cAAc,CAAgB;IAEjD,CAAC;IAKD,KAAK,CAAC,WAAW,CACf,MAAc,EACd,OAAe,EACf,SAAwB,EACxB,OAAe;QAGf,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,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