@go-mailer/jarvis 5.0.12 → 5.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -112,8 +112,8 @@ const authenticateUser = async (request, response, next) => {
112
112
  const authorizeUser = ({ action, resource }) => {
113
113
  return async (request, response, next) => {
114
114
  try {
115
- const { is_admin, tenant_id, user_id } = request
116
- if (is_admin) return next()
115
+ const { is_admin,is_service_request, tenant_id, user_id } = request
116
+ if (is_admin || is_service_request) return next()
117
117
 
118
118
  await checkAuthority({ action, resource, tenant_id, user_id })
119
119
  next()
package/lib/query.js CHANGED
@@ -36,7 +36,7 @@ const buildQuery = (options) => {
36
36
  delete options.sum
37
37
 
38
38
  Object.keys(options).forEach((field) => {
39
- const field_value = options[field] ? options[field].toString().toLowerCase() : ''
39
+ const field_value = options[field] ? options[field].toString() : ''
40
40
  let condition
41
41
 
42
42
  if (field_value.includes(':')) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-mailer/jarvis",
3
- "version": "5.0.12",
3
+ "version": "5.1.0",
4
4
  "main": "index.js",
5
5
  "repository": "git@github.com:go-mailer-ltd/jarvis-node.git",
6
6
  "author": "Nathan Oguntuberu <nateoguns.work@gmail.com>",