From 13fd58333e8280effb679ac93913971b096d5fe3 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Thu, 16 Mar 2017 21:03:55 +0100 Subject: CRUD users --- src/hooks/index.js | 9 --------- 1 file changed, 9 deletions(-) (limited to 'src/hooks/index.js') diff --git a/src/hooks/index.js b/src/hooks/index.js index 2b122bb..4c535c4 100644 --- a/src/hooks/index.js +++ b/src/hooks/index.js @@ -8,12 +8,3 @@ const hooks = require('feathers-hooks'); const auth = require('feathers-authentication').hooks; -const or = require('promise-or'); - -exports.restrictToOwnersOrAdmins = function() { - var ownerHook = auth.restrictToOwner() - var adminHook = auth.restrictToRoles({ roles: ["admin"] }) - return function(hook) { - return or(ownerHook(hook), adminHook(hook)) - }; -}; -- cgit v1.2.3-70-g09d2