@finema/finework-layer 1.0.66 → 1.0.67
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,11 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.0.67](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.66...1.0.67) (2026-05-26)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* refactor permission check logic to use 'some' instead of spreading all permissions ([bdcaeee](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/bdcaeeecb685b8556544ab6ca46f575061b44675))
|
|
8
|
+
|
|
3
9
|
## [1.0.66](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/1.0.65...1.0.66) (2026-05-26)
|
|
4
10
|
|
|
5
11
|
### 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
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
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
|