Commit f8089284 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] critical: a revoked member should not try to be revoked again

parent c8987693
......@@ -314,12 +314,24 @@ export class FileDAL {
}
}
getWrittenIdtyByPubkey(pubkey:string) {
return this.iindexDAL.getFromPubkey(pubkey)
async getWrittenIdtyByPubkey(pubkey:string) {
const idty = await this.iindexDAL.getFromPubkey(pubkey)
if (!idty) {
return null;
}
const membership = await this.mindexDAL.getReducedMS(pubkey)
idty.revoked_on = membership.revoked_on
return idty;
}
getWrittenIdtyByUID(uid:string) {
return this.iindexDAL.getFromUID(uid)
async getWrittenIdtyByUID(uid:string) {
const idty = await this.iindexDAL.getFromUID(uid)
if (!idty) {
return null;
}
const membership = await this.mindexDAL.getReducedMS(idty.pub)
idty.revoked_on = membership.revoked_on
return idty;
}
async fillInMembershipsOfIdentity(queryPromise:Promise<DBIdentity>) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment