summaryrefslogtreecommitdiff
path: root/src/hooks/index.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2017-03-16 21:03:55 +0100
committerJules Laplace <jules@okfoc.us>2017-03-16 21:03:55 +0100
commit13fd58333e8280effb679ac93913971b096d5fe3 (patch)
treec1fb731eb1a8a61b3e237c9feaaa1f7b2e2b6923 /src/hooks/index.js
parent8e05164678d302700c794feecd50d83357f7719d (diff)
CRUD users
Diffstat (limited to 'src/hooks/index.js')
-rw-r--r--src/hooks/index.js9
1 files changed, 0 insertions, 9 deletions
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))
- };
-};