@jmruthers/pace-core 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-GZHIDA4X.js → api-T6CBS7IO.js} +3 -2
- package/dist/cache-I72HKDOA.js +12 -0
- package/dist/cache-I72HKDOA.js.map +1 -0
- package/dist/{chunk-6ZQVSHKL.js → chunk-ANE4PDC2.js} +9 -158
- package/dist/chunk-ANE4PDC2.js.map +1 -0
- package/dist/chunk-MRRFJ6SA.js +161 -0
- package/dist/chunk-MRRFJ6SA.js.map +1 -0
- package/dist/{chunk-OKXMUYIB.js → chunk-O4T53L7X.js} +3 -3
- package/dist/{chunk-7JL3T7BO.js → chunk-UY7AM4QG.js} +3 -3
- package/dist/components.js +3 -2
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/rbac/index.d.ts +2 -0
- package/dist/rbac/index.js +18 -11
- package/dist/rbac/index.js.map +1 -1
- package/docs/api/classes/ErrorBoundary.md +1 -1
- package/docs/api/classes/PublicErrorBoundary.md +1 -1
- package/docs/api/interfaces/AggregateConfig.md +1 -1
- 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/DataTableAction.md +1 -1
- package/docs/api/interfaces/DataTableColumn.md +1 -1
- package/docs/api/interfaces/DataTableProps.md +1 -1
- package/docs/api/interfaces/DataTableToolbarButton.md +1 -1
- package/docs/api/interfaces/EmptyStateConfig.md +1 -1
- package/docs/api/interfaces/EventContextType.md +1 -1
- package/docs/api/interfaces/EventLogoProps.md +1 -1
- package/docs/api/interfaces/EventProviderProps.md +1 -1
- package/docs/api/interfaces/FileSizeLimits.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/NavigationItem.md +1 -1
- package/docs/api/interfaces/NavigationMenuProps.md +1 -1
- 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 +1 -1
- package/docs/api/interfaces/PaletteData.md +1 -1
- 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/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/ToastActionElement.md +1 -1
- package/docs/api/interfaces/ToastProps.md +1 -1
- package/docs/api/interfaces/UnifiedAuthContextType.md +1 -1
- package/docs/api/interfaces/UnifiedAuthProviderProps.md +1 -1
- 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/UserEventAccess.md +1 -1
- package/docs/api/interfaces/UserMenuProps.md +1 -1
- package/docs/api/interfaces/UserProfile.md +1 -1
- package/docs/api/modules.md +2 -2
- package/package.json +1 -1
- package/src/rbac/api.ts +2 -0
- package/src/rbac/cache.ts +2 -0
- package/src/rbac/hooks.ts +7 -0
- package/src/rbac/types.ts +2 -0
- package/dist/chunk-6ZQVSHKL.js.map +0 -1
- /package/dist/{api-GZHIDA4X.js.map → api-T6CBS7IO.js.map} +0 -0
- /package/dist/{chunk-OKXMUYIB.js.map → chunk-O4T53L7X.js.map} +0 -0
- /package/dist/{chunk-7JL3T7BO.js.map → chunk-UY7AM4QG.js.map} +0 -0
package/docs/api/modules.md
CHANGED
package/package.json
CHANGED
package/src/rbac/api.ts
CHANGED
|
@@ -152,6 +152,8 @@ export async function isPermittedCached(input: PermissionCheck): Promise<boolean
|
|
|
152
152
|
organisationId: scope.organisationId!,
|
|
153
153
|
eventId: scope.eventId,
|
|
154
154
|
appId: scope.appId,
|
|
155
|
+
permission,
|
|
156
|
+
pageId,
|
|
155
157
|
});
|
|
156
158
|
|
|
157
159
|
const cached = rbacCache.get<boolean>(cacheKey);
|
package/src/rbac/cache.ts
CHANGED
package/src/rbac/hooks.ts
CHANGED
|
@@ -133,6 +133,13 @@ export function useCan(
|
|
|
133
133
|
console.log('[useCan] check() called with:', { userId, scope, permission, pageId });
|
|
134
134
|
console.log('[useCan] Hook parameters:', { userId, scope, permission, pageId, useCache });
|
|
135
135
|
|
|
136
|
+
// Clear cache for debugging - remove this after fixing
|
|
137
|
+
if (typeof window !== 'undefined') {
|
|
138
|
+
console.log('[useCan] Clearing cache for debugging...');
|
|
139
|
+
const { rbacCache } = await import('./cache');
|
|
140
|
+
rbacCache.clear();
|
|
141
|
+
}
|
|
142
|
+
|
|
136
143
|
if (!userId) {
|
|
137
144
|
console.log('[useCan] No userId, denying access');
|
|
138
145
|
setCan(false);
|
package/src/rbac/types.ts
CHANGED
|
@@ -176,6 +176,8 @@ export interface PermissionCacheKey {
|
|
|
176
176
|
organisationId?: UUID;
|
|
177
177
|
eventId?: string;
|
|
178
178
|
appId?: UUID;
|
|
179
|
+
permission?: Permission;
|
|
180
|
+
pageId?: UUID | string;
|
|
179
181
|
}
|
|
180
182
|
|
|
181
183
|
// ============================================================================
|