Return primary key expiry based on userId param in getExpirationTime
This commit is contained in:
parent
65772d86b3
commit
d74a2af4d3
|
@ -501,7 +501,7 @@ Key.prototype.verifyPrimaryKey = async function(date=new Date(), userId={}) {
|
||||||
* @async
|
* @async
|
||||||
*/
|
*/
|
||||||
Key.prototype.getExpirationTime = async function(capabilities, keyId, userId) {
|
Key.prototype.getExpirationTime = async function(capabilities, keyId, userId) {
|
||||||
const primaryUser = await this.getPrimaryUser(null);
|
const primaryUser = await this.getPrimaryUser(null, userId);
|
||||||
if (!primaryUser) {
|
if (!primaryUser) {
|
||||||
throw new Error('Could not find primary user');
|
throw new Error('Could not find primary user');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user