@jmruthers/pace-core 0.5.76 → 0.5.78
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/CHANGELOG.md +8 -0
- package/dist/{RBACService-C4udt_Zp.d.ts → AuthService-Df3IozMG.d.ts} +10 -118
- package/dist/{DataTable-ntgmhO2W.d.ts → DataTable-BE0OXZKQ.d.ts} +9 -2
- package/dist/{DataTable-4GAVPIEG.js → DataTable-ETGVF4Y5.js} +50 -13
- package/dist/{PublicLoadingSpinner-BiNER8F5.d.ts → PublicLoadingSpinner-CnUaz0vG.d.ts} +5 -2
- package/dist/{UnifiedAuthProvider-Bj6YCf7c.d.ts → UnifiedAuthProvider-B391Aqum.d.ts} +42 -45
- package/dist/{UnifiedAuthProvider-3NKDOSOK.js → UnifiedAuthProvider-P5SOJAQ6.js} +4 -5
- package/dist/{api-DDMUKIUD.js → api-KG4A2X7P.js} +9 -3
- package/dist/{audit-6TOCAMKO.js → audit-65VNHEV2.js} +2 -2
- package/dist/{chunk-K34IM5CT.js → chunk-2OGV6IRV.js} +196 -626
- package/dist/chunk-2OGV6IRV.js.map +1 -0
- package/dist/{chunk-NTNILOBC.js → chunk-5BO3MI5Y.js} +4 -4
- package/dist/{chunk-XLZ7U46Z.js → chunk-CVMVPYAL.js} +9 -60
- package/dist/chunk-CVMVPYAL.js.map +1 -0
- package/dist/{chunk-URUTVZ7N.js → chunk-FL4ZCQLD.js} +2 -2
- package/dist/{chunk-LW7MMEAQ.js → chunk-FT2M4R4F.js} +2 -2
- package/dist/{chunk-5BSLGBYI.js → chunk-JCQZ6LA7.js} +2 -8
- package/dist/{chunk-5BSLGBYI.js.map → chunk-JCQZ6LA7.js.map} +1 -1
- package/dist/{chunk-KHJS6VIA.js → chunk-LRQ6RBJC.js} +157 -112
- package/dist/chunk-LRQ6RBJC.js.map +1 -0
- package/dist/{chunk-WN6XJWOS.js → chunk-MNJXXD6C.js} +274 -743
- package/dist/chunk-MNJXXD6C.js.map +1 -0
- package/dist/{chunk-KK73ZB4E.js → chunk-PTR5PMPE.js} +153 -132
- package/dist/chunk-PTR5PMPE.js.map +1 -0
- package/dist/{chunk-B2WTCLCV.js → chunk-Q7APDV6H.js} +18 -8
- package/dist/chunk-Q7APDV6H.js.map +1 -0
- package/dist/{chunk-A4FUBC7B.js → chunk-QGVSOUJ2.js} +2 -4
- package/dist/{chunk-A4FUBC7B.js.map → chunk-QGVSOUJ2.js.map} +1 -1
- package/dist/{chunk-FGMFQSHX.js → chunk-S63MFSY6.js} +500 -551
- package/dist/chunk-S63MFSY6.js.map +1 -0
- package/dist/{chunk-AFGTSUAD.js → chunk-VSOKOFRF.js} +4 -4
- package/dist/chunk-WUXCWRL6.js +20 -0
- package/dist/chunk-WUXCWRL6.js.map +1 -0
- package/dist/{chunk-Y6TXWPJO.js → chunk-YVVGHRGI.js} +105 -31
- package/dist/chunk-YVVGHRGI.js.map +1 -0
- package/dist/{chunk-M5IWZRBT.js → chunk-ZMNXIJP4.js} +2187 -981
- package/dist/chunk-ZMNXIJP4.js.map +1 -0
- package/dist/components.d.ts +6 -6
- package/dist/components.js +14 -18
- package/dist/components.js.map +1 -1
- package/dist/{database-C3Szpi5J.d.ts → database-BXAfr2Y_.d.ts} +18 -0
- package/dist/hooks.d.ts +5 -5
- package/dist/hooks.js +8 -9
- package/dist/hooks.js.map +1 -1
- package/dist/index.d.ts +19 -27
- package/dist/index.js +21 -29
- package/dist/index.js.map +1 -1
- package/dist/{organisation-BtshODVF.d.ts → organisation-D6qRDtbF.d.ts} +1 -1
- package/dist/providers.d.ts +7 -21
- package/dist/providers.js +3 -10
- package/dist/rbac/index.d.ts +71 -221
- package/dist/rbac/index.js +15 -16
- package/dist/{types-CGX9Vyf5.d.ts → types-BDg1mAGG.d.ts} +36 -6
- package/dist/types.d.ts +3 -3
- package/dist/types.js +61 -18
- package/dist/types.js.map +1 -1
- package/dist/{unified-CM7T0aTK.d.ts → unified-DQ4VcT7H.d.ts} +1 -1
- package/dist/{usePublicRouteParams-B-CumWRc.d.ts → usePublicRouteParams-BlgwXweB.d.ts} +3 -3
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +52 -9
- package/dist/utils.js.map +1 -1
- package/docs/CONTENT_AUDIT_REPORT.md +253 -0
- package/docs/DOCUMENTATION_AUDIT.md +172 -0
- package/docs/README.md +142 -147
- package/docs/STYLE_GUIDE.md +37 -0
- package/docs/api/classes/ColumnFactory.md +17 -17
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/InvalidScopeError.md +4 -4
- package/docs/api/classes/MissingUserContextError.md +4 -4
- package/docs/api/classes/OrganisationContextRequiredError.md +4 -4
- package/docs/api/classes/PermissionDeniedError.md +5 -5
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/classes/RBACAuditManager.md +8 -8
- package/docs/api/classes/RBACCache.md +35 -5
- package/docs/api/classes/RBACEngine.md +49 -20
- package/docs/api/classes/RBACError.md +4 -4
- package/docs/api/classes/RBACNotInitializedError.md +4 -4
- package/docs/api/classes/SecureSupabaseClient.md +1 -1
- package/docs/api/classes/StorageUtils.md +1 -1
- package/docs/api/enums/FileCategory.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +4 -4
- package/docs/api/interfaces/ButtonProps.md +1 -1
- package/docs/api/interfaces/CardProps.md +1 -1
- package/docs/api/interfaces/ColorPalette.md +1 -1
- package/docs/api/interfaces/ColorShade.md +1 -1
- package/docs/api/interfaces/DataAccessRecord.md +1 -1
- package/docs/api/interfaces/DataRecord.md +11 -0
- package/docs/api/interfaces/DataTableAction.md +65 -29
- package/docs/api/interfaces/DataTableColumn.md +36 -23
- package/docs/api/interfaces/DataTableProps.md +80 -38
- package/docs/api/interfaces/DataTableToolbarButton.md +7 -7
- package/docs/api/interfaces/EmptyStateConfig.md +5 -5
- package/docs/api/interfaces/EnhancedNavigationMenuProps.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/FileDisplayProps.md +1 -1
- package/docs/api/interfaces/FileMetadata.md +1 -1
- package/docs/api/interfaces/FileReference.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.md +1 -1
- package/docs/api/interfaces/FileUploadOptions.md +1 -1
- package/docs/api/interfaces/FileUploadProps.md +1 -1
- package/docs/api/interfaces/FooterProps.md +1 -1
- package/docs/api/interfaces/InactivityWarningModalProps.md +1 -1
- package/docs/api/interfaces/InputProps.md +1 -1
- package/docs/api/interfaces/LabelProps.md +1 -1
- package/docs/api/interfaces/LoginFormProps.md +1 -1
- package/docs/api/interfaces/NavigationAccessRecord.md +11 -11
- package/docs/api/interfaces/NavigationContextType.md +9 -9
- package/docs/api/interfaces/NavigationGuardProps.md +1 -1
- package/docs/api/interfaces/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- package/docs/api/interfaces/NavigationProviderProps.md +7 -7
- package/docs/api/interfaces/Organisation.md +1 -1
- package/docs/api/interfaces/OrganisationContextType.md +1 -1
- package/docs/api/interfaces/OrganisationMembership.md +1 -1
- package/docs/api/interfaces/OrganisationProviderProps.md +1 -1
- package/docs/api/interfaces/OrganisationSecurityError.md +1 -1
- package/docs/api/interfaces/PaceAppLayoutProps.md +1 -1
- package/docs/api/interfaces/PaceLoginPageProps.md +16 -3
- package/docs/api/interfaces/PageAccessRecord.md +1 -1
- package/docs/api/interfaces/PagePermissionContextType.md +1 -1
- package/docs/api/interfaces/PagePermissionGuardProps.md +2 -2
- package/docs/api/interfaces/PagePermissionProviderProps.md +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- package/docs/api/interfaces/PermissionEnforcerProps.md +4 -4
- package/docs/api/interfaces/PublicErrorBoundaryProps.md +1 -1
- package/docs/api/interfaces/PublicErrorBoundaryState.md +1 -1
- package/docs/api/interfaces/PublicLoadingSpinnerProps.md +1 -1
- package/docs/api/interfaces/PublicPageFooterProps.md +1 -1
- package/docs/api/interfaces/PublicPageHeaderProps.md +1 -1
- package/docs/api/interfaces/PublicPageLayoutProps.md +1 -1
- package/docs/api/interfaces/RBACConfig.md +1 -1
- package/docs/api/interfaces/RBACLogger.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterContextType.md +1 -1
- package/docs/api/interfaces/RoleBasedRouterProps.md +1 -1
- package/docs/api/interfaces/RouteAccessRecord.md +2 -2
- package/docs/api/interfaces/RouteConfig.md +2 -2
- package/docs/api/interfaces/SecureDataContextType.md +1 -1
- package/docs/api/interfaces/SecureDataProviderProps.md +1 -1
- package/docs/api/interfaces/StorageConfig.md +1 -1
- package/docs/api/interfaces/StorageFileInfo.md +1 -1
- package/docs/api/interfaces/StorageFileMetadata.md +1 -1
- package/docs/api/interfaces/StorageListOptions.md +1 -1
- package/docs/api/interfaces/StorageListResult.md +1 -1
- package/docs/api/interfaces/StorageUploadOptions.md +1 -1
- package/docs/api/interfaces/StorageUploadResult.md +1 -1
- package/docs/api/interfaces/StorageUrlOptions.md +1 -1
- package/docs/api/interfaces/StyleImport.md +1 -1
- package/docs/api/interfaces/SwitchProps.md +1 -1
- package/docs/api/interfaces/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +94 -521
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +16 -16
- package/docs/api/interfaces/UseInactivityTrackerOptions.md +1 -1
- package/docs/api/interfaces/UseInactivityTrackerReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventLogoReturn.md +1 -1
- package/docs/api/interfaces/UsePublicEventOptions.md +1 -1
- package/docs/api/interfaces/UsePublicEventReturn.md +1 -1
- package/docs/api/interfaces/UsePublicRouteParamsReturn.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeOptions.md +1 -1
- package/docs/api/interfaces/UseResolvedScopeReturn.md +1 -1
- package/docs/api/interfaces/UserEventAccess.md +11 -11
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +251 -269
- package/docs/api-reference/components.md +193 -0
- package/docs/api-reference/hooks.md +265 -0
- package/docs/api-reference/providers.md +6 -0
- package/docs/api-reference/types.md +6 -0
- package/docs/api-reference/utilities.md +207 -0
- package/docs/architecture/README.md +6 -0
- package/docs/{database-schema-requirements.md → architecture/database-schema-requirements.md} +6 -0
- package/docs/architecture/rbac-security-architecture.md +258 -0
- package/docs/architecture/services.md +9 -1
- package/docs/best-practices/README.md +6 -0
- package/docs/best-practices/accessibility.md +6 -0
- package/docs/{common-patterns.md → best-practices/common-patterns.md} +6 -0
- package/docs/best-practices/deployment.md +6 -0
- package/docs/best-practices/performance.md +475 -2
- package/docs/best-practices/security.md +6 -0
- package/docs/best-practices/testing.md +6 -0
- package/docs/core-concepts/authentication.md +6 -0
- package/docs/core-concepts/events.md +6 -0
- package/docs/core-concepts/organisations.md +6 -0
- package/docs/core-concepts/permissions.md +6 -0
- package/docs/core-concepts/rbac-system.md +8 -0
- package/docs/documentation-index.md +121 -182
- package/docs/{consuming-app-vite-config.md → getting-started/consuming-app-vite-config.md} +6 -0
- package/docs/getting-started/documentation-index.md +40 -0
- package/docs/getting-started/examples/README.md +878 -35
- package/docs/{faq.md → getting-started/faq.md} +7 -1
- package/docs/getting-started/installation-guide.md +6 -0
- package/docs/{quick-reference.md → getting-started/quick-reference.md} +6 -0
- package/docs/implementation-guides/app-layout.md +6 -0
- package/docs/implementation-guides/authentication.md +1021 -0
- package/docs/implementation-guides/component-styling.md +6 -0
- package/docs/implementation-guides/data-tables.md +1264 -2076
- package/docs/implementation-guides/dynamic-colors.md +6 -0
- package/docs/implementation-guides/event-theming-summary.md +6 -0
- package/docs/{file-reference-system.md → implementation-guides/file-reference-system.md} +6 -0
- package/docs/implementation-guides/file-upload-storage.md +6 -0
- package/docs/implementation-guides/forms.md +6 -0
- package/docs/implementation-guides/inactivity-tracking.md +6 -0
- package/docs/implementation-guides/navigation.md +6 -0
- package/docs/implementation-guides/organisation-security.md +6 -0
- package/docs/implementation-guides/permission-enforcement.md +6 -0
- package/docs/implementation-guides/public-pages-advanced.md +6 -0
- package/docs/implementation-guides/public-pages.md +6 -0
- package/docs/migration/MIGRATION_GUIDE.md +827 -351
- package/docs/migration/README.md +7 -1
- package/docs/migration/organisation-context-timing-fix.md +6 -0
- package/docs/migration/rbac-migration.md +44 -1
- package/docs/migration/service-architecture.md +6 -0
- package/docs/migration/v0.4.15-tailwind-scanning.md +6 -0
- package/docs/migration/v0.4.16-css-first-approach.md +6 -0
- package/docs/migration/v0.4.17-source-path-fix.md +6 -0
- package/docs/rbac/README-rbac-rls-integration.md +6 -0
- package/docs/rbac/README.md +6 -0
- package/docs/rbac/advanced-patterns.md +6 -0
- package/docs/rbac/api-reference.md +7 -1
- package/docs/rbac/breaking-changes-v3.md +222 -0
- package/docs/rbac/examples/rbac-rls-integration-example.md +6 -0
- package/docs/rbac/examples.md +6 -0
- package/docs/rbac/getting-started.md +6 -0
- package/docs/rbac/migration-guide.md +260 -0
- package/docs/rbac/quick-start.md +70 -13
- package/docs/rbac/rbac-rls-integration.md +6 -0
- package/docs/rbac/super-admin-guide.md +6 -0
- package/docs/rbac/troubleshooting.md +6 -0
- package/docs/security/README.md +6 -0
- package/docs/security/checklist.md +6 -0
- package/docs/styles/README.md +7 -1
- package/docs/{usage.md → styles/usage.md} +6 -0
- package/docs/testing/README.md +6 -0
- package/docs/{visual-testing.md → testing/visual-testing.md} +6 -0
- package/docs/troubleshooting/README.md +387 -5
- package/docs/troubleshooting/cake-page-permission-guard-issue-summary.md +6 -0
- package/docs/troubleshooting/common-issues.md +6 -0
- package/docs/troubleshooting/database-view-compatibility.md +6 -0
- package/docs/troubleshooting/organisation-context-setup.md +6 -0
- package/docs/troubleshooting/react-hooks-issue-analysis.md +6 -0
- package/docs/troubleshooting/styling-issues.md +6 -0
- package/docs/troubleshooting/tailwind-content-scanning.md +6 -0
- package/package.json +1 -1
- package/src/__tests__/helpers/__tests__/test-providers.test.tsx +2 -1
- package/src/__tests__/helpers/test-providers.tsx +3 -53
- package/src/components/DataTable/DataTable.test.tsx +319 -0
- package/src/components/DataTable/DataTable.tsx +32 -11
- package/src/components/DataTable/__tests__/{DataTable.comprehensive.test.tsx → DataTable.comprehensive.test.tsx.skip} +6 -4
- package/src/components/DataTable/__tests__/{DataTable.test.tsx → DataTable.test.tsx.skip} +6 -4
- package/src/components/DataTable/__tests__/DataTableCore.test.tsx +31 -9
- package/src/components/DataTable/__tests__/a11y.basic.test.tsx +601 -0
- package/src/components/DataTable/__tests__/keyboard.test.tsx +615 -0
- package/src/components/DataTable/__tests__/pagination.modes.test.tsx +639 -0
- package/src/components/DataTable/__tests__/ssr.strict-mode.test.tsx.skip +330 -0
- package/src/components/DataTable/components/AccessDeniedPage.tsx +2 -2
- package/src/components/DataTable/components/ActionButtons.tsx +88 -104
- package/src/components/DataTable/components/DataTableCore.tsx +309 -337
- package/src/components/DataTable/components/DataTableErrorBoundary.tsx +4 -2
- package/src/components/DataTable/components/DataTableModals.tsx +22 -1
- package/src/components/DataTable/components/EditableRow.tsx +69 -84
- package/src/components/DataTable/components/EmptyState.tsx +5 -1
- package/src/components/DataTable/components/ImportModal.tsx +65 -36
- package/src/components/DataTable/components/PaginationControls.tsx +40 -100
- package/src/components/DataTable/components/UnifiedTableBody.tsx +125 -148
- package/src/components/DataTable/context/DataTableContext.tsx +1 -1
- package/src/components/DataTable/core/ColumnFactory.ts +5 -0
- package/src/components/DataTable/examples/HierarchicalActionsExample.tsx +12 -10
- package/src/components/DataTable/examples/HierarchicalExample.tsx +1 -1
- package/src/components/DataTable/examples/InitialPageSizeExample.tsx +1 -0
- package/src/components/DataTable/examples/PerformanceExample.tsx +1 -0
- package/src/components/DataTable/hooks/__tests__/useColumnOrderPersistence.test.ts +1 -5
- package/src/components/DataTable/hooks/__tests__/useColumnVisibilityPersistence.test.ts +167 -0
- package/src/components/DataTable/hooks/index.ts +7 -0
- package/src/components/DataTable/hooks/useColumnOrderPersistence.ts +32 -15
- package/src/components/DataTable/hooks/useColumnVisibilityPersistence.ts +102 -0
- package/src/components/DataTable/hooks/useDataTableConfiguration.ts +89 -0
- package/src/components/DataTable/hooks/useDataTableDataPipeline.ts +117 -0
- package/src/components/DataTable/hooks/useDataTablePermissions.ts +71 -27
- package/src/components/DataTable/hooks/useDataTableState.ts +39 -11
- package/src/components/DataTable/hooks/useEffectiveColumnOrder.ts +33 -0
- package/src/components/DataTable/hooks/useHierarchicalState.ts +15 -1
- package/src/components/DataTable/hooks/useKeyboardNavigation.ts +447 -0
- package/src/components/DataTable/hooks/useServerSideDataEffect.ts +94 -0
- package/src/components/DataTable/hooks/useTableColumns.ts +10 -7
- package/src/components/DataTable/hooks/useTableHandlers.ts +174 -0
- package/src/components/DataTable/index.ts +12 -3
- package/src/components/DataTable/types.ts +129 -9
- package/src/components/DataTable/utils/__tests__/exportUtils.test.ts +159 -22
- package/src/components/DataTable/utils/__tests__/flexibleImport.test.ts +111 -0
- package/src/components/DataTable/utils/__tests__/rowUtils.test.ts +15 -29
- package/src/components/DataTable/utils/a11yUtils.ts +244 -0
- package/src/components/DataTable/utils/debugTools.ts +609 -0
- package/src/components/DataTable/utils/exportUtils.ts +114 -16
- package/src/components/DataTable/utils/flexibleImport.ts +202 -32
- package/src/components/DataTable/utils/hierarchicalUtils.ts +1 -1
- package/src/components/DataTable/utils/index.ts +2 -0
- package/src/components/DataTable/utils/paginationUtils.ts +350 -0
- package/src/components/DataTable/utils/rowUtils.ts +6 -5
- package/src/components/NavigationMenu/NavigationMenu.test.tsx +19 -24
- package/src/components/NavigationMenu/NavigationMenu.tsx +19 -8
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.security.test.tsx +1 -23
- package/src/components/PaceLoginPage/PaceLoginPage.test.tsx +56 -6
- package/src/components/PaceLoginPage/PaceLoginPage.tsx +137 -13
- package/src/components/PublicLayout/__tests__/PublicPageHeader.test.tsx +1 -1
- package/src/components/Select/Select.tsx +1 -0
- package/src/components/examples/PermissionExample.tsx +173 -0
- package/src/examples/CorrectPublicPageImplementation.tsx +301 -0
- package/src/examples/PublicEventPage.tsx +274 -0
- package/src/examples/PublicPageApp.tsx +308 -0
- package/src/examples/PublicPageUsageExample.tsx +216 -0
- package/src/hooks/__tests__/useOrganisationPermissions.unit.test.tsx +12 -1
- package/src/hooks/__tests__/useOrganisationSecurity.unit.test.tsx +129 -17
- package/src/hooks/__tests__/useRBAC.unit.test.ts +151 -846
- package/src/hooks/useOrganisationPermissions.test.ts +42 -18
- package/src/hooks/useOrganisationPermissions.ts +12 -6
- package/src/hooks/useOrganisationSecurity.test.ts +138 -85
- package/src/hooks/useOrganisationSecurity.ts +41 -10
- package/src/index.ts +0 -1
- package/src/providers/AuthProvider.simplified.tsx +880 -0
- package/src/providers/UnifiedAuthProvider.test.simple.tsx +8 -8
- package/src/providers/__tests__/UnifiedAuthProvider.test.tsx +29 -19
- package/src/providers/index.ts +0 -1
- package/src/providers/services/EventServiceProvider.tsx +19 -15
- package/src/providers/services/InactivityServiceProvider.tsx +19 -15
- package/src/providers/services/OrganisationServiceProvider.tsx +19 -15
- package/src/providers/services/UnifiedAuthProvider.tsx +156 -127
- package/src/providers/services/__tests__/AuthServiceProvider.integration.test.tsx +1 -1
- package/src/providers/services/__tests__/UnifiedAuthProvider.integration.test.tsx +3 -3
- package/src/rbac/README.md +1 -1
- package/src/rbac/__tests__/adapters.comprehensive.test.tsx +25 -27
- package/src/rbac/__tests__/auth-rbac-security.integration.test.tsx +313 -0
- package/src/rbac/__tests__/engine.comprehensive.test.ts +114 -348
- package/src/rbac/__tests__/rbac-engine-core-logic.test.ts +28 -110
- package/src/rbac/__tests__/rbac-engine-simplified.test.ts +33 -85
- package/src/rbac/__tests__/scenarios.user-role.test.tsx +2 -2
- package/src/rbac/adapters.tsx +26 -69
- package/src/rbac/api.test.ts +90 -27
- package/src/rbac/api.ts +61 -10
- package/src/rbac/audit.test.ts +33 -38
- package/src/rbac/audit.ts +21 -6
- package/src/rbac/cache.ts +33 -1
- package/src/rbac/components/NavigationGuard.tsx +11 -11
- package/src/rbac/components/NavigationProvider.test.tsx +11 -5
- package/src/rbac/components/NavigationProvider.tsx +37 -13
- package/src/rbac/components/PagePermissionGuard.tsx +111 -50
- package/src/rbac/components/PagePermissionProvider.tsx +5 -5
- package/src/rbac/components/PermissionEnforcer.tsx +11 -11
- package/src/rbac/components/RoleBasedRouter.tsx +5 -5
- package/src/rbac/components/SecureDataProvider.tsx +5 -5
- package/src/rbac/components/__tests__/NavigationGuard.test.tsx +8 -8
- package/src/rbac/components/__tests__/PagePermissionGuard.test.tsx +14 -14
- package/src/rbac/components/__tests__/PermissionEnforcer.test.tsx +12 -12
- package/src/rbac/components/__tests__/RoleBasedRouter.test.tsx +6 -6
- package/src/rbac/engine.test.simple.ts +19 -13
- package/src/rbac/engine.test.ts +1 -0
- package/src/rbac/engine.ts +330 -766
- package/src/rbac/errors.ts +156 -0
- package/src/rbac/hooks/usePermissions.ts +32 -10
- package/src/rbac/hooks/useRBAC.test.ts +126 -512
- package/src/rbac/hooks/useRBAC.ts +147 -193
- package/src/rbac/hooks/useResolvedScope.ts +12 -0
- package/src/rbac/index.ts +7 -4
- package/src/rbac/security.ts +109 -18
- package/src/rbac/types.ts +12 -1
- package/src/services/AuthService.ts +2 -15
- package/src/services/EventService.ts +43 -46
- package/src/services/OrganisationService.ts +51 -31
- package/src/services/__tests__/AuthService.test.ts +1 -1
- package/src/services/__tests__/EventService.test.ts +1 -1
- package/src/services/__tests__/OrganisationService.test.ts +1 -1
- package/src/services/base/BaseService.ts +8 -0
- package/src/styles/base.css +208 -0
- package/src/styles/semantic.css +24 -0
- package/src/types/database.generated.ts +7347 -0
- package/src/types/database.ts +20 -0
- package/src/utils/logger.ts +179 -0
- package/src/utils/organisationContext.ts +11 -4
- package/src/utils/storage/__tests__/helpers.unit.test.ts +6 -2
- package/dist/appNameResolver-UURKN7NF.js +0 -22
- package/dist/audit-6TOCAMKO.js.map +0 -1
- package/dist/chunk-B2WTCLCV.js.map +0 -1
- package/dist/chunk-FGMFQSHX.js.map +0 -1
- package/dist/chunk-K34IM5CT.js.map +0 -1
- package/dist/chunk-KHJS6VIA.js.map +0 -1
- package/dist/chunk-KK73ZB4E.js.map +0 -1
- package/dist/chunk-M5IWZRBT.js.map +0 -1
- package/dist/chunk-ULBI5JGB.js +0 -109
- package/dist/chunk-ULBI5JGB.js.map +0 -1
- package/dist/chunk-WN6XJWOS.js.map +0 -1
- package/dist/chunk-XLZ7U46Z.js.map +0 -1
- package/dist/chunk-Y6TXWPJO.js.map +0 -1
- package/docs/DOCUMENTATION_CHECKLIST.md +0 -281
- package/docs/TERMINOLOGY.md +0 -231
- package/docs/api/interfaces/RBACContextType.md +0 -468
- package/docs/api/interfaces/RBACProviderProps.md +0 -107
- package/docs/best-practices/performance-expansion.md +0 -473
- package/docs/breaking-changes.md +0 -179
- package/docs/consuming-app-example.md +0 -290
- package/docs/documentation-templates.md +0 -539
- package/docs/examples/navigation-menu-auth-fix.md +0 -344
- package/docs/getting-started/examples/basic-auth-app.md +0 -520
- package/docs/getting-started/examples/full-featured-app.md +0 -616
- package/docs/getting-started/quick-start.md +0 -376
- package/docs/implementation-guides/datatable-filtering.md +0 -313
- package/docs/implementation-guides/datatable-rbac-usage.md +0 -317
- package/docs/implementation-guides/hierarchical-datatable.md +0 -850
- package/docs/implementation-guides/large-datasets.md +0 -281
- package/docs/implementation-guides/performance.md +0 -403
- package/docs/migration/quick-migration-guide.md +0 -320
- package/docs/migration-guide.md +0 -193
- package/docs/migration-guides/unified-auth-provider-mandatory-timeouts.md +0 -226
- package/docs/performance/README.md +0 -551
- package/docs/style-guide.md +0 -964
- package/docs/troubleshooting/authentication-issues.md +0 -334
- package/docs/troubleshooting/debugging.md +0 -1117
- package/docs/troubleshooting/migration.md +0 -918
- package/src/__tests__/hooks/usePermissions.test.ts +0 -261
- package/src/components/PaceAppLayout/__tests__/PaceAppLayout.rbac.test.tsx +0 -574
- package/src/hooks/__tests__/ServiceHooks.test.tsx +0 -613
- package/src/hooks/services/__tests__/useServiceHooks.test.tsx +0 -137
- package/src/hooks/services/usePermissions.ts +0 -70
- package/src/hooks/services/useRBACService.ts +0 -30
- package/src/hooks/usePermissionCheck.ts +0 -150
- package/src/providers/__tests__/ServiceProviders.test.tsx +0 -477
- package/src/providers/services/RBACServiceProvider.tsx +0 -79
- package/src/rbac/__tests__/integration.authflow.test.tsx +0 -119
- package/src/rbac/__tests__/integration.navigation.test.tsx +0 -69
- package/src/rbac/__tests__/integration.securedata.test.tsx +0 -92
- package/src/rbac/__tests__/integration.smoke.test.tsx +0 -73
- package/src/rbac/providers/RBACProvider.tsx +0 -645
- package/src/rbac/providers/__tests__/RBACProvider.integration.test.tsx +0 -688
- package/src/rbac/providers/__tests__/RBACProvider.test.tsx +0 -1186
- package/src/rbac/providers/index.ts +0 -11
- package/src/services/RBACService.ts +0 -522
- package/src/services/__tests__/RBACService.test.ts +0 -492
- package/src/services/interfaces/IRBACService.ts +0 -62
- package/src/utils/appNameResolver.test 2.ts +0 -494
- /package/dist/{DataTable-4GAVPIEG.js.map → DataTable-ETGVF4Y5.js.map} +0 -0
- /package/dist/{UnifiedAuthProvider-3NKDOSOK.js.map → UnifiedAuthProvider-P5SOJAQ6.js.map} +0 -0
- /package/dist/{api-DDMUKIUD.js.map → api-KG4A2X7P.js.map} +0 -0
- /package/dist/{appNameResolver-UURKN7NF.js.map → audit-65VNHEV2.js.map} +0 -0
- /package/dist/{chunk-NTNILOBC.js.map → chunk-5BO3MI5Y.js.map} +0 -0
- /package/dist/{chunk-URUTVZ7N.js.map → chunk-FL4ZCQLD.js.map} +0 -0
- /package/dist/{chunk-LW7MMEAQ.js.map → chunk-FT2M4R4F.js.map} +0 -0
- /package/dist/{chunk-AFGTSUAD.js.map → chunk-VSOKOFRF.js.map} +0 -0
- /package/docs/{app.css.example → styles/app.css.example} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / ColumnFactory
|
|
2
2
|
|
|
3
3
|
# Class: ColumnFactory\<TData\>
|
|
4
4
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
| Name | Type |
|
|
8
8
|
| :------ | :------ |
|
|
9
|
-
| `TData` | extends [`DataRecord`](../
|
|
9
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) = [`DataRecord`](../interfaces/DataRecord.md) |
|
|
10
10
|
|
|
11
11
|
## Table of contents
|
|
12
12
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
|
|
35
35
|
| Name | Type |
|
|
36
36
|
| :------ | :------ |
|
|
37
|
-
| `TData` | extends [`DataRecord`](../
|
|
37
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) = [`DataRecord`](../interfaces/DataRecord.md) |
|
|
38
38
|
|
|
39
39
|
#### Returns
|
|
40
40
|
|
|
@@ -52,7 +52,7 @@ Create a text column
|
|
|
52
52
|
|
|
53
53
|
| Name | Type |
|
|
54
54
|
| :------ | :------ |
|
|
55
|
-
| `TData` | extends [`DataRecord`](../
|
|
55
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
56
56
|
|
|
57
57
|
#### Parameters
|
|
58
58
|
|
|
@@ -67,7 +67,7 @@ Create a text column
|
|
|
67
67
|
|
|
68
68
|
#### Defined in
|
|
69
69
|
|
|
70
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
70
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:81](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L81)
|
|
71
71
|
|
|
72
72
|
___
|
|
73
73
|
|
|
@@ -81,7 +81,7 @@ Create a number column
|
|
|
81
81
|
|
|
82
82
|
| Name | Type |
|
|
83
83
|
| :------ | :------ |
|
|
84
|
-
| `TData` | extends [`DataRecord`](../
|
|
84
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
85
85
|
|
|
86
86
|
#### Parameters
|
|
87
87
|
|
|
@@ -96,7 +96,7 @@ Create a number column
|
|
|
96
96
|
|
|
97
97
|
#### Defined in
|
|
98
98
|
|
|
99
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
99
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:104](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L104)
|
|
100
100
|
|
|
101
101
|
___
|
|
102
102
|
|
|
@@ -110,7 +110,7 @@ Create a date column
|
|
|
110
110
|
|
|
111
111
|
| Name | Type |
|
|
112
112
|
| :------ | :------ |
|
|
113
|
-
| `TData` | extends [`DataRecord`](../
|
|
113
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
114
114
|
|
|
115
115
|
#### Parameters
|
|
116
116
|
|
|
@@ -125,7 +125,7 @@ Create a date column
|
|
|
125
125
|
|
|
126
126
|
#### Defined in
|
|
127
127
|
|
|
128
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
128
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:137](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L137)
|
|
129
129
|
|
|
130
130
|
___
|
|
131
131
|
|
|
@@ -139,7 +139,7 @@ Create a boolean column
|
|
|
139
139
|
|
|
140
140
|
| Name | Type |
|
|
141
141
|
| :------ | :------ |
|
|
142
|
-
| `TData` | extends [`DataRecord`](../
|
|
142
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
143
143
|
|
|
144
144
|
#### Parameters
|
|
145
145
|
|
|
@@ -154,7 +154,7 @@ Create a boolean column
|
|
|
154
154
|
|
|
155
155
|
#### Defined in
|
|
156
156
|
|
|
157
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
157
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:172](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L172)
|
|
158
158
|
|
|
159
159
|
___
|
|
160
160
|
|
|
@@ -168,7 +168,7 @@ Create an action column
|
|
|
168
168
|
|
|
169
169
|
| Name | Type |
|
|
170
170
|
| :------ | :------ |
|
|
171
|
-
| `TData` | extends [`DataRecord`](../
|
|
171
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
172
172
|
|
|
173
173
|
#### Parameters
|
|
174
174
|
|
|
@@ -183,7 +183,7 @@ Create an action column
|
|
|
183
183
|
|
|
184
184
|
#### Defined in
|
|
185
185
|
|
|
186
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
186
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:201](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L201)
|
|
187
187
|
|
|
188
188
|
___
|
|
189
189
|
|
|
@@ -197,7 +197,7 @@ Create a custom column
|
|
|
197
197
|
|
|
198
198
|
| Name | Type |
|
|
199
199
|
| :------ | :------ |
|
|
200
|
-
| `TData` | extends [`DataRecord`](../
|
|
200
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
201
201
|
|
|
202
202
|
#### Parameters
|
|
203
203
|
|
|
@@ -212,7 +212,7 @@ Create a custom column
|
|
|
212
212
|
|
|
213
213
|
#### Defined in
|
|
214
214
|
|
|
215
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
215
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:234](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L234)
|
|
216
216
|
|
|
217
217
|
___
|
|
218
218
|
|
|
@@ -226,7 +226,7 @@ Create columns from simple configuration
|
|
|
226
226
|
|
|
227
227
|
| Name | Type |
|
|
228
228
|
| :------ | :------ |
|
|
229
|
-
| `TData` | extends [`DataRecord`](../
|
|
229
|
+
| `TData` | extends [`DataRecord`](../interfaces/DataRecord.md) |
|
|
230
230
|
|
|
231
231
|
#### Parameters
|
|
232
232
|
|
|
@@ -240,4 +240,4 @@ Create columns from simple configuration
|
|
|
240
240
|
|
|
241
241
|
#### Defined in
|
|
242
242
|
|
|
243
|
-
[packages/core/src/components/DataTable/core/ColumnFactory.ts:
|
|
243
|
+
[packages/core/src/components/DataTable/core/ColumnFactory.ts:257](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/components/DataTable/core/ColumnFactory.ts#L257)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / InvalidScopeError
|
|
2
2
|
|
|
3
3
|
# Class: InvalidScopeError
|
|
4
4
|
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
#### Defined in
|
|
44
44
|
|
|
45
|
-
[packages/core/src/rbac/types.ts:
|
|
45
|
+
[packages/core/src/rbac/types.ts:336](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L336)
|
|
46
46
|
|
|
47
47
|
## Properties
|
|
48
48
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
#### Defined in
|
|
58
58
|
|
|
59
|
-
[packages/core/src/rbac/types.ts:
|
|
59
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
60
60
|
|
|
61
61
|
___
|
|
62
62
|
|
|
@@ -70,4 +70,4 @@ ___
|
|
|
70
70
|
|
|
71
71
|
#### Defined in
|
|
72
72
|
|
|
73
|
-
[packages/core/src/rbac/types.ts:
|
|
73
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / MissingUserContextError
|
|
2
2
|
|
|
3
3
|
# Class: MissingUserContextError
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[packages/core/src/rbac/types.ts:
|
|
38
|
+
[packages/core/src/rbac/types.ts:347](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L347)
|
|
39
39
|
|
|
40
40
|
## Properties
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[packages/core/src/rbac/types.ts:
|
|
52
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
53
53
|
|
|
54
54
|
___
|
|
55
55
|
|
|
@@ -63,4 +63,4 @@ ___
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/core/src/rbac/types.ts:
|
|
66
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / OrganisationContextRequiredError
|
|
2
2
|
|
|
3
3
|
# Class: OrganisationContextRequiredError
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[packages/core/src/rbac/types.ts:
|
|
38
|
+
[packages/core/src/rbac/types.ts:316](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L316)
|
|
39
39
|
|
|
40
40
|
## Properties
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[packages/core/src/rbac/types.ts:
|
|
52
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
53
53
|
|
|
54
54
|
___
|
|
55
55
|
|
|
@@ -63,4 +63,4 @@ ___
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/core/src/rbac/types.ts:
|
|
66
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / PermissionDeniedError
|
|
2
2
|
|
|
3
3
|
# Class: PermissionDeniedError
|
|
4
4
|
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
|
|
30
30
|
| Name | Type |
|
|
31
31
|
| :------ | :------ |
|
|
32
|
-
| `permission` | \`
|
|
32
|
+
| `permission` | \`create:$\{string}\` \| \`update:$\{string}\` \| \`read:$\{string}\` \| \`delete:$\{string}\` |
|
|
33
33
|
| `context?` | `Record`\<`string`, `any`\> |
|
|
34
34
|
|
|
35
35
|
#### Returns
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
#### Defined in
|
|
44
44
|
|
|
45
|
-
[packages/core/src/rbac/types.ts:
|
|
45
|
+
[packages/core/src/rbac/types.ts:305](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L305)
|
|
46
46
|
|
|
47
47
|
## Properties
|
|
48
48
|
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
|
|
57
57
|
#### Defined in
|
|
58
58
|
|
|
59
|
-
[packages/core/src/rbac/types.ts:
|
|
59
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
60
60
|
|
|
61
61
|
___
|
|
62
62
|
|
|
@@ -70,4 +70,4 @@ ___
|
|
|
70
70
|
|
|
71
71
|
#### Defined in
|
|
72
72
|
|
|
73
|
-
[packages/core/src/rbac/types.ts:
|
|
73
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / RBACAuditManager
|
|
2
2
|
|
|
3
3
|
# Class: RBACAuditManager
|
|
4
4
|
|
|
@@ -129,7 +129,7 @@ Emit a permission check audit event
|
|
|
129
129
|
|
|
130
130
|
#### Defined in
|
|
131
131
|
|
|
132
|
-
[packages/core/src/rbac/audit.ts:
|
|
132
|
+
[packages/core/src/rbac/audit.ts:215](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L215)
|
|
133
133
|
|
|
134
134
|
___
|
|
135
135
|
|
|
@@ -151,7 +151,7 @@ Emit a permission denied audit event
|
|
|
151
151
|
|
|
152
152
|
#### Defined in
|
|
153
153
|
|
|
154
|
-
[packages/core/src/rbac/audit.ts:
|
|
154
|
+
[packages/core/src/rbac/audit.ts:227](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L227)
|
|
155
155
|
|
|
156
156
|
___
|
|
157
157
|
|
|
@@ -173,7 +173,7 @@ Emit a role granted audit event
|
|
|
173
173
|
|
|
174
174
|
#### Defined in
|
|
175
175
|
|
|
176
|
-
[packages/core/src/rbac/audit.ts:
|
|
176
|
+
[packages/core/src/rbac/audit.ts:239](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L239)
|
|
177
177
|
|
|
178
178
|
___
|
|
179
179
|
|
|
@@ -195,7 +195,7 @@ Emit a role revoked audit event
|
|
|
195
195
|
|
|
196
196
|
#### Defined in
|
|
197
197
|
|
|
198
|
-
[packages/core/src/rbac/audit.ts:
|
|
198
|
+
[packages/core/src/rbac/audit.ts:251](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L251)
|
|
199
199
|
|
|
200
200
|
___
|
|
201
201
|
|
|
@@ -217,7 +217,7 @@ Emit an RLS denied audit event
|
|
|
217
217
|
|
|
218
218
|
#### Defined in
|
|
219
219
|
|
|
220
|
-
[packages/core/src/rbac/audit.ts:
|
|
220
|
+
[packages/core/src/rbac/audit.ts:263](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L263)
|
|
221
221
|
|
|
222
222
|
___
|
|
223
223
|
|
|
@@ -242,7 +242,7 @@ Promise resolving to audit events
|
|
|
242
242
|
|
|
243
243
|
#### Defined in
|
|
244
244
|
|
|
245
|
-
[packages/core/src/rbac/audit.ts:
|
|
245
|
+
[packages/core/src/rbac/audit.ts:277](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L277)
|
|
246
246
|
|
|
247
247
|
___
|
|
248
248
|
|
|
@@ -267,4 +267,4 @@ Promise resolving to audit events
|
|
|
267
267
|
|
|
268
268
|
#### Defined in
|
|
269
269
|
|
|
270
|
-
[packages/core/src/rbac/audit.ts:
|
|
270
|
+
[packages/core/src/rbac/audit.ts:299](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/audit.ts#L299)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / RBACCache
|
|
2
2
|
|
|
3
3
|
# Class: RBACCache
|
|
4
4
|
|
|
@@ -21,6 +21,7 @@ Provides 60-second TTL and pattern-based invalidation for permission checks.
|
|
|
21
21
|
- [clear](RBACCache.md#clear)
|
|
22
22
|
- [getStats](RBACCache.md#getstats)
|
|
23
23
|
- [onInvalidate](RBACCache.md#oninvalidate)
|
|
24
|
+
- [generateKey](RBACCache.md#generatekey)
|
|
24
25
|
- [generatePermissionKey](RBACCache.md#generatepermissionkey)
|
|
25
26
|
- [generateAccessLevelKey](RBACCache.md#generateaccesslevelkey)
|
|
26
27
|
- [generatePermissionMapKey](RBACCache.md#generatepermissionmapkey)
|
|
@@ -207,11 +208,40 @@ Add an invalidation callback
|
|
|
207
208
|
|
|
208
209
|
___
|
|
209
210
|
|
|
211
|
+
### generateKey
|
|
212
|
+
|
|
213
|
+
▸ **generateKey**(`userId`, `permission`, `organisationId?`, `eventId?`, `appId?`, `pageId?`): `string`
|
|
214
|
+
|
|
215
|
+
Generate cache key for permission check (simplified signature)
|
|
216
|
+
|
|
217
|
+
#### Parameters
|
|
218
|
+
|
|
219
|
+
| Name | Type | Description |
|
|
220
|
+
| :------ | :------ | :------ |
|
|
221
|
+
| `userId` | `string` | User ID |
|
|
222
|
+
| `permission` | `string` | Permission string |
|
|
223
|
+
| `organisationId?` | `string` | Organisation ID (optional) |
|
|
224
|
+
| `eventId?` | `string` | Event ID (optional) |
|
|
225
|
+
| `appId?` | `string` | App ID (optional) |
|
|
226
|
+
| `pageId?` | `string` | Page ID (optional) |
|
|
227
|
+
|
|
228
|
+
#### Returns
|
|
229
|
+
|
|
230
|
+
`string`
|
|
231
|
+
|
|
232
|
+
String cache key
|
|
233
|
+
|
|
234
|
+
#### Defined in
|
|
235
|
+
|
|
236
|
+
[packages/core/src/rbac/cache.ts:136](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/cache.ts#L136)
|
|
237
|
+
|
|
238
|
+
___
|
|
239
|
+
|
|
210
240
|
### generatePermissionKey
|
|
211
241
|
|
|
212
242
|
▸ **generatePermissionKey**(`key`): `string`
|
|
213
243
|
|
|
214
|
-
Generate cache key for permission check
|
|
244
|
+
Generate cache key for permission check (object signature)
|
|
215
245
|
|
|
216
246
|
#### Parameters
|
|
217
247
|
|
|
@@ -227,7 +257,7 @@ String cache key
|
|
|
227
257
|
|
|
228
258
|
#### Defined in
|
|
229
259
|
|
|
230
|
-
[packages/core/src/rbac/cache.ts:
|
|
260
|
+
[packages/core/src/rbac/cache.ts:163](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/cache.ts#L163)
|
|
231
261
|
|
|
232
262
|
___
|
|
233
263
|
|
|
@@ -254,7 +284,7 @@ String cache key
|
|
|
254
284
|
|
|
255
285
|
#### Defined in
|
|
256
286
|
|
|
257
|
-
[packages/core/src/rbac/cache.ts:
|
|
287
|
+
[packages/core/src/rbac/cache.ts:186](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/cache.ts#L186)
|
|
258
288
|
|
|
259
289
|
___
|
|
260
290
|
|
|
@@ -281,4 +311,4 @@ String cache key
|
|
|
281
311
|
|
|
282
312
|
#### Defined in
|
|
283
313
|
|
|
284
|
-
[packages/core/src/rbac/cache.ts:
|
|
314
|
+
[packages/core/src/rbac/cache.ts:212](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/cache.ts#L212)
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / RBACEngine
|
|
2
2
|
|
|
3
3
|
# Class: RBACEngine
|
|
4
4
|
|
|
5
|
-
RBAC Engine
|
|
5
|
+
Simplified RBAC Engine
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Delegates all permission checks to the database via a single RPC function.
|
|
8
|
+
This reduces complexity, improves performance, and enhances security.
|
|
8
9
|
|
|
9
10
|
## Table of contents
|
|
10
11
|
|
|
@@ -17,7 +18,8 @@ Implements the core permission algorithm with deny-overrides-allow precedence.
|
|
|
17
18
|
- [isPermitted](RBACEngine.md#ispermitted)
|
|
18
19
|
- [getAccessLevel](RBACEngine.md#getaccesslevel)
|
|
19
20
|
- [getPermissionMap](RBACEngine.md#getpermissionmap)
|
|
20
|
-
- [
|
|
21
|
+
- [resolveAppContext](RBACEngine.md#resolveappcontext)
|
|
22
|
+
- [getRoleContext](RBACEngine.md#getrolecontext)
|
|
21
23
|
|
|
22
24
|
## Constructors
|
|
23
25
|
|
|
@@ -37,22 +39,24 @@ Implements the core permission algorithm with deny-overrides-allow precedence.
|
|
|
37
39
|
|
|
38
40
|
#### Defined in
|
|
39
41
|
|
|
40
|
-
[packages/core/src/rbac/engine.ts:
|
|
42
|
+
[packages/core/src/rbac/engine.ts:52](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L52)
|
|
41
43
|
|
|
42
44
|
## Methods
|
|
43
45
|
|
|
44
46
|
### isPermitted
|
|
45
47
|
|
|
46
|
-
▸ **isPermitted**(`input`, `securityContext
|
|
48
|
+
▸ **isPermitted**(`input`, `securityContext`): `Promise`\<`boolean`\>
|
|
47
49
|
|
|
48
50
|
Check if a user has a specific permission
|
|
49
51
|
|
|
52
|
+
This method now delegates to the database RPC function for all the heavy lifting.
|
|
53
|
+
|
|
50
54
|
#### Parameters
|
|
51
55
|
|
|
52
56
|
| Name | Type | Description |
|
|
53
57
|
| :------ | :------ | :------ |
|
|
54
58
|
| `input` | [`PermissionCheck`](../modules.md#permissioncheck) | Permission check input |
|
|
55
|
-
| `securityContext
|
|
59
|
+
| `securityContext` | `SecurityContext` | Security context for validation (required) |
|
|
56
60
|
|
|
57
61
|
#### Returns
|
|
58
62
|
|
|
@@ -62,7 +66,7 @@ Promise resolving to permission result
|
|
|
62
66
|
|
|
63
67
|
#### Defined in
|
|
64
68
|
|
|
65
|
-
[packages/core/src/rbac/engine.ts:
|
|
69
|
+
[packages/core/src/rbac/engine.ts:69](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L69)
|
|
66
70
|
|
|
67
71
|
___
|
|
68
72
|
|
|
@@ -72,6 +76,8 @@ ___
|
|
|
72
76
|
|
|
73
77
|
Get user's access level in a scope
|
|
74
78
|
|
|
79
|
+
This is derived from roles, not permissions.
|
|
80
|
+
|
|
75
81
|
#### Parameters
|
|
76
82
|
|
|
77
83
|
| Name | Type | Description |
|
|
@@ -88,7 +94,7 @@ Promise resolving to access level
|
|
|
88
94
|
|
|
89
95
|
#### Defined in
|
|
90
96
|
|
|
91
|
-
[packages/core/src/rbac/engine.ts:
|
|
97
|
+
[packages/core/src/rbac/engine.ts:282](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L282)
|
|
92
98
|
|
|
93
99
|
___
|
|
94
100
|
|
|
@@ -98,6 +104,9 @@ ___
|
|
|
98
104
|
|
|
99
105
|
Get user's permission map for a scope
|
|
100
106
|
|
|
107
|
+
This builds a map of page IDs to allowed operations.
|
|
108
|
+
Uses the simplified RPC for each permission check.
|
|
109
|
+
|
|
101
110
|
#### Parameters
|
|
102
111
|
|
|
103
112
|
| Name | Type | Description |
|
|
@@ -114,28 +123,48 @@ Promise resolving to permission map
|
|
|
114
123
|
|
|
115
124
|
#### Defined in
|
|
116
125
|
|
|
117
|
-
[packages/core/src/rbac/engine.ts:
|
|
126
|
+
[packages/core/src/rbac/engine.ts:364](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L364)
|
|
118
127
|
|
|
119
128
|
___
|
|
120
129
|
|
|
121
|
-
###
|
|
130
|
+
### resolveAppContext
|
|
122
131
|
|
|
123
|
-
▸ **
|
|
124
|
-
|
|
125
|
-
Get app configuration including requires_event setting
|
|
132
|
+
▸ **resolveAppContext**(`input`): `Promise`\<``null`` \| `RBACAppContext`\>
|
|
126
133
|
|
|
127
134
|
#### Parameters
|
|
128
135
|
|
|
129
|
-
| Name | Type |
|
|
130
|
-
| :------ | :------ |
|
|
131
|
-
| `
|
|
136
|
+
| Name | Type |
|
|
137
|
+
| :------ | :------ |
|
|
138
|
+
| `input` | `Object` |
|
|
139
|
+
| `input.userId` | `string` |
|
|
140
|
+
| `input.appName` | `string` |
|
|
132
141
|
|
|
133
142
|
#### Returns
|
|
134
143
|
|
|
135
|
-
`Promise`\<``null`` \|
|
|
144
|
+
`Promise`\<``null`` \| `RBACAppContext`\>
|
|
145
|
+
|
|
146
|
+
#### Defined in
|
|
147
|
+
|
|
148
|
+
[packages/core/src/rbac/engine.ts:436](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L436)
|
|
149
|
+
|
|
150
|
+
___
|
|
151
|
+
|
|
152
|
+
### getRoleContext
|
|
153
|
+
|
|
154
|
+
▸ **getRoleContext**(`input`): `Promise`\<`RBACRoleContext`\>
|
|
155
|
+
|
|
156
|
+
#### Parameters
|
|
157
|
+
|
|
158
|
+
| Name | Type |
|
|
159
|
+
| :------ | :------ |
|
|
160
|
+
| `input` | `Object` |
|
|
161
|
+
| `input.userId` | `string` |
|
|
162
|
+
| `input.scope` | [`Scope`](../modules.md#scope) |
|
|
163
|
+
|
|
164
|
+
#### Returns
|
|
136
165
|
|
|
137
|
-
Promise
|
|
166
|
+
`Promise`\<`RBACRoleContext`\>
|
|
138
167
|
|
|
139
168
|
#### Defined in
|
|
140
169
|
|
|
141
|
-
[packages/core/src/rbac/engine.ts:
|
|
170
|
+
[packages/core/src/rbac/engine.ts:468](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/engine.ts#L468)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / RBACError
|
|
2
2
|
|
|
3
3
|
# Class: RBACError
|
|
4
4
|
|
|
@@ -53,7 +53,7 @@ Error.constructor
|
|
|
53
53
|
|
|
54
54
|
#### Defined in
|
|
55
55
|
|
|
56
|
-
[packages/core/src/rbac/types.ts:
|
|
56
|
+
[packages/core/src/rbac/types.ts:294](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L294)
|
|
57
57
|
|
|
58
58
|
## Properties
|
|
59
59
|
|
|
@@ -63,7 +63,7 @@ Error.constructor
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/core/src/rbac/types.ts:
|
|
66
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
67
67
|
|
|
68
68
|
___
|
|
69
69
|
|
|
@@ -73,4 +73,4 @@ ___
|
|
|
73
73
|
|
|
74
74
|
#### Defined in
|
|
75
75
|
|
|
76
|
-
[packages/core/src/rbac/types.ts:
|
|
76
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[@jmruthers/pace-core - v0.5.
|
|
1
|
+
[@jmruthers/pace-core - v0.5.78](../README.md) / [Exports](../modules.md) / RBACNotInitializedError
|
|
2
2
|
|
|
3
3
|
# Class: RBACNotInitializedError
|
|
4
4
|
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
|
|
36
36
|
#### Defined in
|
|
37
37
|
|
|
38
|
-
[packages/core/src/rbac/types.ts:
|
|
38
|
+
[packages/core/src/rbac/types.ts:326](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L326)
|
|
39
39
|
|
|
40
40
|
## Properties
|
|
41
41
|
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
|
|
50
50
|
#### Defined in
|
|
51
51
|
|
|
52
|
-
[packages/core/src/rbac/types.ts:
|
|
52
|
+
[packages/core/src/rbac/types.ts:296](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L296)
|
|
53
53
|
|
|
54
54
|
___
|
|
55
55
|
|
|
@@ -63,4 +63,4 @@ ___
|
|
|
63
63
|
|
|
64
64
|
#### Defined in
|
|
65
65
|
|
|
66
|
-
[packages/core/src/rbac/types.ts:
|
|
66
|
+
[packages/core/src/rbac/types.ts:297](https://github.com/jmruthers/pace-core/blob/main/packages/core/src/rbac/types.ts#L297)
|