@goplusvn/core 0.1.81 → 0.1.82
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/package.json
CHANGED
|
@@ -121,19 +121,17 @@ export function assertWorkspacesInScope(
|
|
|
121
121
|
requestedWorkspaceIds: readonly string[],
|
|
122
122
|
): void {
|
|
123
123
|
if (actor.canManageAll) return;
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
"Bạn không được uỷ quyền quản trị workspace nào.",
|
|
128
|
-
);
|
|
129
|
-
}
|
|
124
|
+
|
|
125
|
+
// [MODIFIED] Relaxed rule: allow users to operate in workspaces they are members of,
|
|
126
|
+
// without requiring explicit 'admin' privileges over them.
|
|
130
127
|
const outside = requestedWorkspaceIds.filter(
|
|
131
|
-
(id) => !isWorkspaceAdmin(actor.scope, id),
|
|
128
|
+
(id) => !isWorkspaceAdmin(actor.scope, id) && !actor.scope.memberIds.includes(id),
|
|
132
129
|
);
|
|
130
|
+
|
|
133
131
|
if (outside.length > 0) {
|
|
134
132
|
throw new DelegationError(
|
|
135
133
|
"D1_OUT_OF_SCOPE",
|
|
136
|
-
`Ngoài phạm vi
|
|
134
|
+
`Ngoài phạm vi của bạn: ${outside.join(", ")}. Bạn phải là thành viên hoặc quản trị viên của đơn vị này.`,
|
|
137
135
|
);
|
|
138
136
|
}
|
|
139
137
|
}
|