mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-08 04:27:38 +00:00
Merge pull request #4771 from Infisical/fix/address-outdated-org-permission-usage
fix: addressed outdated org permission usage
This commit is contained in:
@@ -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" });
|
||||||
|
|||||||
Reference in New Issue
Block a user