summaryrefslogtreecommitdiff
path: root/src/hooks/index.js
diff options
context:
space:
mode:
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))
- };
-};