Return primary key expiry based on userId param in getExpirationTime

This commit is contained in:
Daniel Huigens 2018-12-14 16:38:49 +01:00
parent 65772d86b3
commit d74a2af4d3

View File

@ -501,7 +501,7 @@ Key.prototype.verifyPrimaryKey = async function(date=new Date(), userId={}) {
* @async
*/
Key.prototype.getExpirationTime = async function(capabilities, keyId, userId) {
const primaryUser = await this.getPrimaryUser(null);
const primaryUser = await this.getPrimaryUser(null, userId);
if (!primaryUser) {
throw new Error('Could not find primary user');
}