@finema/finework-layer 1.0.66 → 1.0.68

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 CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.0.68](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.67...1.0.68) (2026-05-26)
4
+
5
+ ### Features
6
+
7
+ * add LOAN module to UserModule enum ([edb7f5b](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/edb7f5befe6c6974fa13a2810c52d246a27931cd))
8
+
9
+ ## [1.0.67](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.66...1.0.67) (2026-05-26)
10
+
11
+ ### Features
12
+
13
+ * refactor permission check logic to use 'some' instead of spreading all permissions ([bdcaeee](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/bdcaeeecb685b8556544ab6ca46f575061b44675))
14
+
3
15
  ## [1.0.66](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.65...1.0.66) (2026-05-26)
4
16
 
5
17
  ### Features
@@ -306,22 +306,15 @@ const filterItems = (items: NavigationMenuItem[]): NavigationMenuItem[] => {
306
306
  // permissions: ['pmo:USER', 'pmo:ADMIN', 'pmo:SUPER'] => module: 'pmo', permissions: ['USER', 'ADMIN', 'SUPER']
307
307
  const permissionStrings = item.permissions as string[]
308
308
 
309
- // Extract module from first permission (all should have same module)
310
- const firstPermission = permissionStrings[0]
311
-
312
- if (!firstPermission) {
313
- return true
314
- }
315
-
316
- const [moduleStr] = firstPermission.split(':')
317
-
318
- // Extract all permission levels
319
- const permissionLevels = permissionStrings.map(
320
- (p) => p.split(':')[1],
321
- )
322
- .filter((p): p is string => !!p)
323
-
324
- return auth.hasPermission(moduleStr as UserModule, ...permissionLevels)
309
+ return permissionStrings
310
+ .map((p) => p.split(':'))
311
+ .some(([moduleStr, permission]) => {
312
+ if (!moduleStr || !permission) {
313
+ return false
314
+ }
315
+
316
+ return auth.hasPermission(moduleStr as UserModule, permission)
317
+ })
325
318
  }
326
319
 
327
320
  // Recursively filter children
@@ -103,6 +103,7 @@ export enum UserModule {
103
103
  LG = 'lg',
104
104
  EFACTORING = 'efactoring',
105
105
  RESOURCE = 'resource',
106
+ LOAN = 'loan',
106
107
  }
107
108
 
108
109
  export interface IUserAccessLevel {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@finema/finework-layer",
3
3
  "type": "module",
4
- "version": "1.0.66",
4
+ "version": "1.0.68",
5
5
  "main": "./nuxt.config.ts",
6
6
  "scripts": {
7
7
  "dev": "nuxi dev .playground -o",