Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aws-user-service

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aws-user-service - npm Package Compare versions

Comparing version 1.1.5 to 1.1.6

8

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc