@urga-panel/ur-panels-core 1.0.17 → 1.0.18
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.
|
@@ -45,7 +45,10 @@ export class ProjectInfoService extends Service {
|
|
|
45
45
|
Object.entries(this.pages).forEach(([key, page]) => {
|
|
46
46
|
if (page.showInMenu) {
|
|
47
47
|
if (userGroup && userGroup == 'admin') {
|
|
48
|
-
|
|
48
|
+
// If onlyForGroup is true, admin cannot see this page
|
|
49
|
+
if (page.onlyForGroup !== true) {
|
|
50
|
+
result[key] = page;
|
|
51
|
+
}
|
|
49
52
|
}
|
|
50
53
|
else {
|
|
51
54
|
if (userGroup) {
|
package/package.json
CHANGED
|
@@ -17,6 +17,7 @@ export type ProjectsPages = {
|
|
|
17
17
|
service?: PageService; // Optional service name for custom handling
|
|
18
18
|
serviceRef: any;
|
|
19
19
|
userGroup?: string; // Optional user group for access control
|
|
20
|
+
onlyForGroup?: boolean; // If true, only the specified userGroup can see this page (admin excluded)
|
|
20
21
|
};
|
|
21
22
|
}
|
|
22
23
|
|
|
@@ -85,7 +86,10 @@ export abstract class ProjectInfoService extends Service {
|
|
|
85
86
|
Object.entries(this.pages).forEach(([key, page]) => {
|
|
86
87
|
if (page.showInMenu) {
|
|
87
88
|
if (userGroup && userGroup == 'admin') {
|
|
88
|
-
|
|
89
|
+
// If onlyForGroup is true, admin cannot see this page
|
|
90
|
+
if (page.onlyForGroup !== true) {
|
|
91
|
+
result[key] = page;
|
|
92
|
+
}
|
|
89
93
|
}
|
|
90
94
|
else {
|
|
91
95
|
if (userGroup) {
|