(unlockedKey, userId)
| 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(); |
nothing calls this directly
no test coverage detected