New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

express-masquerade

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

express-masquerade - npm Package Compare versions

Comparing version 0.1.0 to 0.1.1

2

index.js

@@ -8,3 +8,3 @@ module.exports = function(getUser, options) {

if (typeof options.authorize === 'function' && !options.authorize(req, res, next)) return next();
if (typeof options.authorize === 'function' && !options.authorize(req)) return next();

@@ -11,0 +11,0 @@ var id = req.get(options.header);

{
"name": "express-masquerade",
"description": "masquerade as other users",
"version": "0.1.0",
"version": "0.1.1",
"contributors": [

@@ -9,3 +9,3 @@ "Chris Roth <chris@cjroth.com>"

"license": "MIT",
"repository": "cjroth.com/express-masquerade",
"repository": "cjroth/express-masquerade",
"keywords": [

@@ -12,0 +12,0 @@ "express",

@@ -15,7 +15,9 @@ # express-masquerade

```js
var express = require('express');
var masquerade = require('express-masquerade');
var app = express();
app.use(require('express-masquerade')(function(id, done) {
User
.find(id)
.complete(done);
app.use(masquerade(function(id, next) {
User.find(id).complete(next);
}));

@@ -56,3 +58,3 @@ ```

var options = {
authorize = function(req, res, next) {
authorize: function(req) {
return req.user.role === 'admin';

@@ -59,0 +61,0 @@ }

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