do not allow disabling permissions in production

This commit is contained in:
Grzegorz Leoniec 2018-11-22 12:22:22 +01:00
parent c1387f262d
commit 3912515c25

View File

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