@mondaydotcomorg/monday-authorization 3.5.1-fix-authorize-profile-picker-b5f77b0 → 3.5.1-fix-authorize-profile-picker-9fcaf6a

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.
@@ -98,16 +98,16 @@ class AuthorizationService {
98
98
  }
99
99
  const allowedProfiles = this.igniteClient.configuration.getObjectValue(ALLOWED_SDK_PLATFORM_PROFILES_KEY, []);
100
100
  const isAllowedProfile = allowedProfiles.includes(appName);
101
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile }, 'AuthorizationService.getProfile: checking allowed profiles');
101
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile }, 'AuthorizationService.getProfile: checking allowed profiles');
102
102
  if (isAllowedProfile) {
103
103
  const profile = attributionsService.getProfile();
104
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via allowed profiles');
104
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via allowed profiles');
105
105
  return profile;
106
106
  }
107
107
  const inReleaseProfiles = this.igniteClient.configuration.getObjectValue(IN_RELEASE_SDK_PLATFORM_PROFILES_KEY, []);
108
108
  const isInReleaseProfile = inReleaseProfiles.includes(appName);
109
109
  const isFeatureFlagReleased = this.igniteClient.isReleased(PLATFORM_PROFILE_RELEASE_FF, { accountId, userId });
110
- authorizationInternalService.logger.debug({
110
+ authorizationInternalService.logger.info({
111
111
  tag: 'auth-debug',
112
112
  accountId,
113
113
  userId,
@@ -119,10 +119,10 @@ class AuthorizationService {
119
119
  }, 'AuthorizationService.getProfile: checking feature flag release');
120
120
  if (isInReleaseProfile && isFeatureFlagReleased) {
121
121
  const profile = attributionsService.getProfile();
122
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via feature flag release');
122
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via feature flag release');
123
123
  return profile;
124
124
  }
125
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile: attributionsService.PlatformProfile.APP }, 'AuthorizationService.getProfile: selected default APP profile');
125
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, appName, profile: attributionsService.PlatformProfile.APP }, 'AuthorizationService.getProfile: selected default APP profile');
126
126
  return attributionsService.PlatformProfile.APP;
127
127
  }
128
128
  static async canActionInScopeMultiple(accountId, userId, scopedActions) {
@@ -130,7 +130,7 @@ class AuthorizationService {
130
130
  return [];
131
131
  }
132
132
  const shouldNavigateToGraph = Boolean(this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId }));
133
- authorizationInternalService.logger.debug({
133
+ authorizationInternalService.logger.info({
134
134
  tag: 'auth-debug',
135
135
  accountId,
136
136
  userId,
@@ -142,12 +142,12 @@ class AuthorizationService {
142
142
  let apiType;
143
143
  if (shouldNavigateToGraph) {
144
144
  apiType = 'graph';
145
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using graph API flow');
145
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using graph API flow');
146
146
  scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
147
147
  }
148
148
  else {
149
149
  apiType = 'platform';
150
- authorizationInternalService.logger.debug({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using platform API flow');
150
+ authorizationInternalService.logger.info({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using platform API flow');
151
151
  const profile = this.getProfile(accountId, userId);
152
152
  const internalAuthToken = authorizationInternalService.AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
153
153
  scopedActionResponseObjects = await this.platformApi.checkPermissions(profile, internalAuthToken, userId, scopedActions);
@@ -96,16 +96,16 @@ class AuthorizationService {
96
96
  }
97
97
  const allowedProfiles = this.igniteClient.configuration.getObjectValue(ALLOWED_SDK_PLATFORM_PROFILES_KEY, []);
98
98
  const isAllowedProfile = allowedProfiles.includes(appName);
99
- logger.debug({ tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile }, 'AuthorizationService.getProfile: checking allowed profiles');
99
+ logger.info({ tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile }, 'AuthorizationService.getProfile: checking allowed profiles');
100
100
  if (isAllowedProfile) {
101
101
  const profile = getProfile();
102
- logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via allowed profiles');
102
+ logger.info({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via allowed profiles');
103
103
  return profile;
104
104
  }
105
105
  const inReleaseProfiles = this.igniteClient.configuration.getObjectValue(IN_RELEASE_SDK_PLATFORM_PROFILES_KEY, []);
106
106
  const isInReleaseProfile = inReleaseProfiles.includes(appName);
107
107
  const isFeatureFlagReleased = this.igniteClient.isReleased(PLATFORM_PROFILE_RELEASE_FF, { accountId, userId });
108
- logger.debug({
108
+ logger.info({
109
109
  tag: 'auth-debug',
110
110
  accountId,
111
111
  userId,
@@ -117,10 +117,10 @@ class AuthorizationService {
117
117
  }, 'AuthorizationService.getProfile: checking feature flag release');
118
118
  if (isInReleaseProfile && isFeatureFlagReleased) {
119
119
  const profile = getProfile();
120
- logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via feature flag release');
120
+ logger.info({ tag: 'auth-debug', accountId, userId, appName, profile }, 'AuthorizationService.getProfile: selected profile via feature flag release');
121
121
  return profile;
122
122
  }
123
- logger.debug({ tag: 'auth-debug', accountId, userId, appName, profile: PlatformProfile.APP }, 'AuthorizationService.getProfile: selected default APP profile');
123
+ logger.info({ tag: 'auth-debug', accountId, userId, appName, profile: PlatformProfile.APP }, 'AuthorizationService.getProfile: selected default APP profile');
124
124
  return PlatformProfile.APP;
125
125
  }
126
126
  static async canActionInScopeMultiple(accountId, userId, scopedActions) {
@@ -128,7 +128,7 @@ class AuthorizationService {
128
128
  return [];
129
129
  }
130
130
  const shouldNavigateToGraph = Boolean(this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId }));
131
- logger.debug({
131
+ logger.info({
132
132
  tag: 'auth-debug',
133
133
  accountId,
134
134
  userId,
@@ -140,12 +140,12 @@ class AuthorizationService {
140
140
  let apiType;
141
141
  if (shouldNavigateToGraph) {
142
142
  apiType = 'graph';
143
- logger.debug({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using graph API flow');
143
+ logger.info({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using graph API flow');
144
144
  scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
145
145
  }
146
146
  else {
147
147
  apiType = 'platform';
148
- logger.debug({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using platform API flow');
148
+ logger.info({ tag: 'auth-debug', accountId, userId, apiType }, 'AuthorizationService.canActionInScopeMultiple: using platform API flow');
149
149
  const profile = this.getProfile(accountId, userId);
150
150
  const internalAuthToken = AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
151
151
  scopedActionResponseObjects = await this.platformApi.checkPermissions(profile, internalAuthToken, userId, scopedActions);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-authorization",
3
- "version": "3.5.1-fix-authorize-profile-picker-b5f77b0",
3
+ "version": "3.5.1-fix-authorize-profile-picker-9fcaf6a",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "BSD-3-Clause",
@@ -161,14 +161,14 @@ export class AuthorizationService {
161
161
  []
162
162
  );
163
163
  const isAllowedProfile = allowedProfiles.includes(appName);
164
- logger.debug(
164
+ logger.info(
165
165
  { tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile },
166
166
  'AuthorizationService.getProfile: checking allowed profiles'
167
167
  );
168
168
 
169
169
  if (isAllowedProfile) {
170
170
  const profile = getProfile();
171
- logger.debug(
171
+ logger.info(
172
172
  { tag: 'auth-debug', accountId, userId, appName, profile },
173
173
  'AuthorizationService.getProfile: selected profile via allowed profiles'
174
174
  );
@@ -182,7 +182,7 @@ export class AuthorizationService {
182
182
  const isInReleaseProfile = inReleaseProfiles.includes(appName);
183
183
  const isFeatureFlagReleased = this.igniteClient.isReleased(PLATFORM_PROFILE_RELEASE_FF, { accountId, userId });
184
184
 
185
- logger.debug(
185
+ logger.info(
186
186
  {
187
187
  tag: 'auth-debug',
188
188
  accountId,
@@ -198,14 +198,14 @@ export class AuthorizationService {
198
198
 
199
199
  if (isInReleaseProfile && isFeatureFlagReleased) {
200
200
  const profile = getProfile();
201
- logger.debug(
201
+ logger.info(
202
202
  { tag: 'auth-debug', accountId, userId, appName, profile },
203
203
  'AuthorizationService.getProfile: selected profile via feature flag release'
204
204
  );
205
205
  return profile;
206
206
  }
207
207
 
208
- logger.debug(
208
+ logger.info(
209
209
  { tag: 'auth-debug', accountId, userId, appName, profile: PlatformProfile.APP },
210
210
  'AuthorizationService.getProfile: selected default APP profile'
211
211
  );
@@ -225,7 +225,7 @@ export class AuthorizationService {
225
225
  this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId })
226
226
  );
227
227
 
228
- logger.debug(
228
+ logger.info(
229
229
  {
230
230
  tag: 'auth-debug',
231
231
  accountId,
@@ -242,14 +242,14 @@ export class AuthorizationService {
242
242
 
243
243
  if (shouldNavigateToGraph) {
244
244
  apiType = 'graph';
245
- logger.debug(
245
+ logger.info(
246
246
  { tag: 'auth-debug', accountId, userId, apiType },
247
247
  'AuthorizationService.canActionInScopeMultiple: using graph API flow'
248
248
  );
249
249
  scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
250
250
  } else {
251
251
  apiType = 'platform';
252
- logger.debug(
252
+ logger.info(
253
253
  { tag: 'auth-debug', accountId, userId, apiType },
254
254
  'AuthorizationService.canActionInScopeMultiple: using platform API flow'
255
255
  );