authsome
Advanced tools
Comparing version 0.0.8 to 0.0.9
@@ -144,2 +144,7 @@ 'use strict'; | ||
function unauthenticatedUser(operation, object) { | ||
// Public/unauthenticated users can GET /collections | ||
if (operation === 'GET' && object && object.path === '/collections') { | ||
return true; | ||
} | ||
// Public/unauthenticated users can GET /collections/:id/fragments, filtered by 'published' | ||
@@ -158,3 +163,3 @@ if (operation === 'GET' && object && object.path === '/collections/:id/fragments') { | ||
filter: function filter(collection) { | ||
return pick(collection, ['id', 'title', 'owners']); | ||
return pick(collection, ['id', 'title', 'owners', 'fragments']); | ||
} | ||
@@ -161,0 +166,0 @@ }; |
{ | ||
"name": "authsome", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Flexible team-based authorization", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -28,2 +28,7 @@ const pick = require('lodash/pick') | ||
function unauthenticatedUser (operation, object) { | ||
// Public/unauthenticated users can GET /collections | ||
if (operation === 'GET' && object && object.path === '/collections') { | ||
return true | ||
} | ||
// Public/unauthenticated users can GET /collections/:id/fragments, filtered by 'published' | ||
@@ -39,3 +44,3 @@ if (operation === 'GET' && object && object.path === '/collections/:id/fragments') { | ||
return { | ||
filter: collection => pick(collection, ['id', 'title', 'owners']) | ||
filter: collection => pick(collection, ['id', 'title', 'owners', 'fragments']) | ||
} | ||
@@ -42,0 +47,0 @@ } |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
152349
755
0