mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-03 02:25:48 +00:00
add back role migration
This commit is contained in:
@@ -819,3 +819,18 @@ export const backfillPermission = async () => {
|
|||||||
console.info("Could not acquire lock for script [backfillPermission], skipping");
|
console.info("Could not acquire lock for script [backfillPermission], skipping");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const migrateRoleFromOwnerToAdmin = async () => {
|
||||||
|
await MembershipOrg.updateMany(
|
||||||
|
{
|
||||||
|
role: OWNER
|
||||||
|
},
|
||||||
|
{
|
||||||
|
$set: {
|
||||||
|
role: ADMIN
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
console.info("Backfill: Finished converting owner role to member");
|
||||||
|
}
|
||||||
@@ -18,7 +18,8 @@ import {
|
|||||||
backfillServiceToken,
|
backfillServiceToken,
|
||||||
backfillServiceTokenMultiScope,
|
backfillServiceTokenMultiScope,
|
||||||
backfillTrustedIps,
|
backfillTrustedIps,
|
||||||
backfillUserAuthMethods
|
backfillUserAuthMethods,
|
||||||
|
migrateRoleFromOwnerToAdmin
|
||||||
} from "./backfillData";
|
} from "./backfillData";
|
||||||
import {
|
import {
|
||||||
reencryptBotOrgKeys,
|
reencryptBotOrgKeys,
|
||||||
@@ -85,6 +86,7 @@ export const setup = async () => {
|
|||||||
await backfillTrustedIps();
|
await backfillTrustedIps();
|
||||||
await backfillUserAuthMethods();
|
await backfillUserAuthMethods();
|
||||||
// await backfillPermission();
|
// await backfillPermission();
|
||||||
|
await migrateRoleFromOwnerToAdmin()
|
||||||
|
|
||||||
// re-encrypt any data previously encrypted under server hex 128-bit ENCRYPTION_KEY
|
// re-encrypt any data previously encrypted under server hex 128-bit ENCRYPTION_KEY
|
||||||
// to base64 256-bit ROOT_ENCRYPTION_KEY
|
// to base64 256-bit ROOT_ENCRYPTION_KEY
|
||||||
|
|||||||
Reference in New Issue
Block a user