aws-user-service
Advanced tools
Comparing version 1.1.5 to 1.1.6
@@ -16,7 +16,10 @@ const AWS = require('aws-sdk'); | ||
const realUserId = this.getActualUserIdFromRequest(request) | ||
console.log('request.query.impersonatingUserId', request.query.impersonatingUserId) | ||
if (!request.query.impersonatingUserId) { | ||
console.log('Returning real user') | ||
return realUserId | ||
} | ||
// check if current user is Admin | ||
console.log('checking admin permissions') | ||
const adminCheckSuccessful = await this.isAdmin(realUserId) | ||
@@ -27,3 +30,4 @@ if (adminCheckSuccessful === true) { | ||
} | ||
console.log('error due to absent of edmin permission but is trying to impersonate user', request.query.impersonatingUserId) | ||
throw new Error('Non admin attempt to impersonate'); | ||
@@ -30,0 +34,0 @@ } |
{ | ||
"name": "aws-user-service", | ||
"version": "1.1.5", | ||
"version": "1.1.6", | ||
"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
4201
96