mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +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");
|
||||
}
|
||||
};
|
||||
|
||||
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,
|
||||
backfillServiceTokenMultiScope,
|
||||
backfillTrustedIps,
|
||||
backfillUserAuthMethods
|
||||
backfillUserAuthMethods,
|
||||
migrateRoleFromOwnerToAdmin
|
||||
} from "./backfillData";
|
||||
import {
|
||||
reencryptBotOrgKeys,
|
||||
@@ -85,6 +86,7 @@ export const setup = async () => {
|
||||
await backfillTrustedIps();
|
||||
await backfillUserAuthMethods();
|
||||
// await backfillPermission();
|
||||
await migrateRoleFromOwnerToAdmin()
|
||||
|
||||
// re-encrypt any data previously encrypted under server hex 128-bit ENCRYPTION_KEY
|
||||
// to base64 256-bit ROOT_ENCRYPTION_KEY
|
||||
|
||||
Reference in New Issue
Block a user