Update src/middleware/index.js

Co-Authored-By: appinteractive <greg@app-interactive.de>
This commit is contained in:
Robert Schäfer 2018-11-23 16:51:29 +01:00 committed by GitHub
parent 3912515c25
commit 68b143be7e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -18,7 +18,7 @@ export default schema => {
softDeleteMiddleware
]
// add permisions middleware if we are not seeding to the first position
// add permisions middleware at the first position (unless we're seeding)
// NOTE: DO NOT SET THE PERMISSION FLAT YOUR SELF
if (process.env.PERMISSIONS !== 'disabled' && process.env.NODE_ENV !== 'production') {
middleware.unshift(permissionsMiddleware.generate(schema))