aws-user-service
Advanced tools
Comparing version 1.1.8 to 1.1.9
14
index.js
@@ -19,3 +19,3 @@ const AWS = require('aws-sdk'); | ||
} | ||
// check if current user is Admin | ||
@@ -27,4 +27,4 @@ const adminCheckSuccessful = await this.isAdmin(realUserId) | ||
} | ||
console.log('Non admin permission but is trying to impersonate user', request.query.impersonatingUserId) | ||
console.log('No admin permission to impersonate user', request.query.impersonatingUserId) | ||
throw new Error('Non admin attempt to impersonate'); | ||
@@ -90,5 +90,3 @@ } | ||
console.log('user groups:', groups) | ||
if (!groups) | ||
if (groups == null) | ||
return false | ||
@@ -101,6 +99,6 @@ | ||
if (!groups.data) | ||
if (!groups.Groups) | ||
return false | ||
return groups.data.Groups.filter(x => x.GroupName === "SenterAdmin").length === 1 | ||
return groups.Groups.filter(x => x.GroupName === "SenterAdmin").length === 1 | ||
} | ||
@@ -107,0 +105,0 @@ |
{ | ||
"name": "aws-user-service", | ||
"version": "1.1.8", | ||
"version": "1.1.9", | ||
"description": "Contain methods to work with asw user", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3963
93