MCPcopy
hub / github.com/mailvelope/mailvelope / revokeUser

Method revokeUser

src/modules/KeyringLocal.js:243–253  ·  view source on GitHub ↗
(unlockedKey, userId)

Source from the content-addressed store, hash-verified

241 }
242
243 async revokeUser(unlockedKey, userId) {
244 const user = unlockedKey.users.find(({userID: {userID}}) => userID === userId);
245 const signingKey = await unlockedKey.getSigningKey();
246 const revUser = await user.revoke(signingKey.keyPacket);
247 const fingerprint = unlockedKey.getFingerprint();
248 const originalKey = this.getPrivateKeyByFpr(fingerprint);
249 await originalKey.users.find(({userID: {userID}}) => userID === userId).update(revUser);
250 await this.sync.add(fingerprint, keyringSync.UPDATE);
251 await this.keystore.store();
252 await this.sync.commit();
253 }
254
255 async addUser(unlockedKey, user) {
256 const {user: {userID: primaryUserId}, selfCertification: primaryUserSelfCertification} = await unlockedKey.getPrimaryUser();

Callers

nothing calls this directly

Calls 5

getPrivateKeyByFprMethod · 0.80
updateMethod · 0.80
addMethod · 0.80
commitMethod · 0.80
storeMethod · 0.45

Tested by

no test coverage detected