mirror of
https://github.com/serverless/serverless.git
synced 2026-01-18 14:58:43 +00:00
add getLocalAccessKey method
This commit is contained in:
parent
3c5eb68db5
commit
e7e4b0154e
@ -329,6 +329,18 @@ class Utils {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getLocalAccessKey() {
|
||||
const userConfig = configUtils.getConfig();
|
||||
const currentId = userConfig.userId;
|
||||
const globalConfig = configUtils.getGlobalConfig();
|
||||
if (globalConfig.users && globalConfig.users[currentId] &&
|
||||
globalConfig.users[currentId].dashboard &&
|
||||
globalConfig.users[currentId].dashboard.accessKey) {
|
||||
return globalConfig.users[currentId].dashboard.accessKey;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Utils;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user