fix: addressed outdated org permission usage

This commit is contained in:
Sheen Capadngan
2025-10-29 02:06:27 +08:00
parent 2830d465aa
commit deb12249df
@@ -772,13 +772,14 @@ export const externalMigrationServiceFactory = ({
namespace: string; namespace: string;
mountPath: string; mountPath: string;
}) => { }) => {
const { hasRole } = await permissionService.getOrgPermission( const { hasRole } = await permissionService.getOrgPermission({
actor.type, scope: OrganizationActionScope.Any,
actor.id, actor: actor.type,
actor.orgId, actorId: actor.id,
actor.authMethod, orgId: actor.orgId,
actor.orgId actorAuthMethod: actor.authMethod,
); actorOrgId: actor.orgId
});
if (!hasRole(OrgMembershipRole.Admin)) { if (!hasRole(OrgMembershipRole.Admin)) {
throw new ForbiddenRequestError({ message: "Only admins can get Kubernetes roles" }); throw new ForbiddenRequestError({ message: "Only admins can get Kubernetes roles" });