mirror of
https://github.com/serverless/serverless.git
synced 2026-01-25 15:07:39 +00:00
Merge pull request #5335 from johnlim/master
Fixes #5188 "Failed to fetch the event types list due the error: API …
This commit is contained in:
commit
660804d4a6
@ -334,12 +334,9 @@ class Utils {
|
||||
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;
|
||||
const username = _.get(globalConfig, `users[${currentId}].dashboard.username`);
|
||||
return _.get(globalConfig, `users[${currentId}].dashboard.accessKey`, false) ||
|
||||
_.get(globalConfig, `users[${currentId}].dashboard.accessKeys[${username}]`, false);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user