@mondaydotcomorg/monday-authorization 1.0.16 → 1.0.17

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.
@@ -66,7 +66,7 @@ class AuthorizationService {
66
66
  if (!isAuthorized) {
67
67
  unauthorizedObjects.push(authorizationObject);
68
68
  }
69
- sendAuthorizationCheckMetric(authorizationObject.resource_type, isAuthorized);
69
+ sendAuthorizationCheckMetric(authorizationObject.resource_type, action, isAuthorized);
70
70
  });
71
71
  if (unauthorizedObjects.length > 0) {
72
72
  logger.info({
@@ -99,11 +99,12 @@ function createAuthorizationParams(resources, action) {
99
99
  function logOnFetchFail(retries, error, response) {
100
100
  logger.error({ attempt: retries, error }, 'Authorization attempt failed due to network issues');
101
101
  }
102
- function sendAuthorizationCheckMetric(resourceType, isAuthorized) {
102
+ function sendAuthorizationCheckMetric(resourceType, action, isAuthorized) {
103
103
  const metricsManager = prometheus_service_1.getMetricsManager();
104
104
  if (metricsManager) {
105
105
  metricsManager.increaseCounter(prometheus_service_1.METRICS.AUTHORIZATION_CHECK, {
106
106
  resourceType,
107
+ action,
107
108
  isAuthorized,
108
109
  });
109
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-authorization",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "BSD-3-Clause",
@@ -31,5 +31,5 @@
31
31
  "files": [
32
32
  "dist/"
33
33
  ],
34
- "gitHead": "bc21495debb5e34772c3c1fd8dff26870081d103"
34
+ "gitHead": "36dfeeb235968ae2763021c3901cc0e5fe459e8a"
35
35
  }