@mondaydotcomorg/monday-authorization 3.5.1-fix-authorize-profile-picker-b5f77b0 → 3.5.1-fix-authorize-profile-picker-dfc6315
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-service.d.ts","sourceRoot":"","sources":["../src/authorization-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAmB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG7F,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACb,MAAM,kCAAkC,CAAC;AAe1C,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC7C;AAED,wBAAgB,sBAAsB,CAAC,wBAAwB,EAAE,kBAAkB,QAElF;AAMD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,KAAK,QAAQ,GAK1B;IACD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAW;IAEpC,OAAO,CAAC,MAAM,KAAK,WAAW,GAK7B;IACD,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAc;IAE1C,MAAM,CAAC,eAAe,IAAI,IAAI;IAK9B,MAAM,CAAC,WAAW,CAAC,MAAC;IACpB,MAAM,CAAC,sCAAsC,CAAC,EAAE,MAAM,CAAC;IACvD,MAAM,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAEnC;;;OAGG;WACU,YAAY,CACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,SA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BAUpB,oBAAoB;CAmF1C;AAED,wBAAgB,cAAc,CAC5B,MAAM,KAAA,EACN,sCAAsC,GAAE,MAAiD,QAY1F;AAED,wBAAsB,eAAe,kBAMpC;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAepG"}
|
|
@@ -98,17 +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
|
-
|
|
101
|
+
console.log('AUTH-DEBUG: getProfile called', { accountId, userId, appName, allowedProfiles, isAllowedProfile });
|
|
102
102
|
if (isAllowedProfile) {
|
|
103
103
|
const profile = attributionsService.getProfile();
|
|
104
|
-
|
|
104
|
+
console.log('AUTH-DEBUG: selected profile via allowed profiles', { accountId, userId, appName, profile });
|
|
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
|
-
|
|
111
|
-
tag: 'auth-debug',
|
|
110
|
+
console.log('AUTH-DEBUG: checking feature flag release', {
|
|
112
111
|
accountId,
|
|
113
112
|
userId,
|
|
114
113
|
appName,
|
|
@@ -116,13 +115,18 @@ class AuthorizationService {
|
|
|
116
115
|
isInReleaseProfile,
|
|
117
116
|
isFeatureFlagReleased,
|
|
118
117
|
featureFlag: PLATFORM_PROFILE_RELEASE_FF,
|
|
119
|
-
}
|
|
118
|
+
});
|
|
120
119
|
if (isInReleaseProfile && isFeatureFlagReleased) {
|
|
121
120
|
const profile = attributionsService.getProfile();
|
|
122
|
-
|
|
121
|
+
console.log('AUTH-DEBUG: selected profile via feature flag release', { accountId, userId, appName, profile });
|
|
123
122
|
return profile;
|
|
124
123
|
}
|
|
125
|
-
|
|
124
|
+
console.log('AUTH-DEBUG: selected default APP profile', {
|
|
125
|
+
accountId,
|
|
126
|
+
userId,
|
|
127
|
+
appName,
|
|
128
|
+
profile: attributionsService.PlatformProfile.APP,
|
|
129
|
+
});
|
|
126
130
|
return attributionsService.PlatformProfile.APP;
|
|
127
131
|
}
|
|
128
132
|
static async canActionInScopeMultiple(accountId, userId, scopedActions) {
|
|
@@ -130,24 +134,23 @@ class AuthorizationService {
|
|
|
130
134
|
return [];
|
|
131
135
|
}
|
|
132
136
|
const shouldNavigateToGraph = Boolean(this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId }));
|
|
133
|
-
|
|
134
|
-
tag: 'auth-debug',
|
|
137
|
+
console.log('AUTH-DEBUG: determining which API flow to use', {
|
|
135
138
|
accountId,
|
|
136
139
|
userId,
|
|
137
140
|
shouldNavigateToGraph,
|
|
138
141
|
featureFlag: NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF,
|
|
139
|
-
}
|
|
142
|
+
});
|
|
140
143
|
const startTime = perf_hooks.performance.now();
|
|
141
144
|
let scopedActionResponseObjects;
|
|
142
145
|
let apiType;
|
|
143
146
|
if (shouldNavigateToGraph) {
|
|
144
147
|
apiType = 'graph';
|
|
145
|
-
|
|
148
|
+
console.log('AUTH-DEBUG: using graph API flow', { accountId, userId, apiType });
|
|
146
149
|
scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
|
|
147
150
|
}
|
|
148
151
|
else {
|
|
149
152
|
apiType = 'platform';
|
|
150
|
-
|
|
153
|
+
console.log('AUTH-DEBUG: using platform API flow', { accountId, userId, apiType });
|
|
151
154
|
const profile = this.getProfile(accountId, userId);
|
|
152
155
|
const internalAuthToken = authorizationInternalService.AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
|
|
153
156
|
scopedActionResponseObjects = await this.platformApi.checkPermissions(profile, internalAuthToken, userId, scopedActions);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-service.d.ts","sourceRoot":"","sources":["../../src/authorization-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAmB,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC5E,OAAO,EAAE,MAAM,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAG7F,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,0BAA0B,EAC1B,YAAY,EACb,MAAM,kCAAkC,CAAC;AAe1C,MAAM,WAAW,iBAAiB;IAChC,YAAY,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,mBAAmB,EAAE,CAAC;CAC7C;AAED,wBAAgB,sBAAsB,CAAC,wBAAwB,EAAE,kBAAkB,QAElF;AAMD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,MAAM,KAAK,QAAQ,GAK1B;IACD,OAAO,CAAC,MAAM,CAAC,SAAS,CAAC,CAAW;IAEpC,OAAO,CAAC,MAAM,KAAK,WAAW,GAK7B;IACD,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,CAAc;IAE1C,MAAM,CAAC,eAAe,IAAI,IAAI;IAK9B,MAAM,CAAC,WAAW,CAAC,MAAC;IACpB,MAAM,CAAC,sCAAsC,CAAC,EAAE,MAAM,CAAC;IACvD,MAAM,CAAC,YAAY,CAAC,EAAE,YAAY,CAAC;IAEnC;;;OAGG;WACU,YAAY,CACvB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,QAAQ,EAAE,EACrB,MAAM,EAAE,MAAM,GACb,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MAAM,KAAA,EACN,sCAAsC,GAAE,MAAiD,QAY1F;AAED,wBAAsB,eAAe,kBAMpC;AAED,wBAAgB,yBAAyB,CAAC,SAAS,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,mBAAmB,CAepG"}
|
|
@@ -96,17 +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
|
-
|
|
99
|
+
console.log('AUTH-DEBUG: getProfile called', { accountId, userId, appName, allowedProfiles, isAllowedProfile });
|
|
100
100
|
if (isAllowedProfile) {
|
|
101
101
|
const profile = getProfile();
|
|
102
|
-
|
|
102
|
+
console.log('AUTH-DEBUG: selected profile via allowed profiles', { accountId, userId, appName, profile });
|
|
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
|
-
|
|
109
|
-
tag: 'auth-debug',
|
|
108
|
+
console.log('AUTH-DEBUG: checking feature flag release', {
|
|
110
109
|
accountId,
|
|
111
110
|
userId,
|
|
112
111
|
appName,
|
|
@@ -114,13 +113,18 @@ class AuthorizationService {
|
|
|
114
113
|
isInReleaseProfile,
|
|
115
114
|
isFeatureFlagReleased,
|
|
116
115
|
featureFlag: PLATFORM_PROFILE_RELEASE_FF,
|
|
117
|
-
}
|
|
116
|
+
});
|
|
118
117
|
if (isInReleaseProfile && isFeatureFlagReleased) {
|
|
119
118
|
const profile = getProfile();
|
|
120
|
-
|
|
119
|
+
console.log('AUTH-DEBUG: selected profile via feature flag release', { accountId, userId, appName, profile });
|
|
121
120
|
return profile;
|
|
122
121
|
}
|
|
123
|
-
|
|
122
|
+
console.log('AUTH-DEBUG: selected default APP profile', {
|
|
123
|
+
accountId,
|
|
124
|
+
userId,
|
|
125
|
+
appName,
|
|
126
|
+
profile: PlatformProfile.APP,
|
|
127
|
+
});
|
|
124
128
|
return PlatformProfile.APP;
|
|
125
129
|
}
|
|
126
130
|
static async canActionInScopeMultiple(accountId, userId, scopedActions) {
|
|
@@ -128,24 +132,23 @@ class AuthorizationService {
|
|
|
128
132
|
return [];
|
|
129
133
|
}
|
|
130
134
|
const shouldNavigateToGraph = Boolean(this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId }));
|
|
131
|
-
|
|
132
|
-
tag: 'auth-debug',
|
|
135
|
+
console.log('AUTH-DEBUG: determining which API flow to use', {
|
|
133
136
|
accountId,
|
|
134
137
|
userId,
|
|
135
138
|
shouldNavigateToGraph,
|
|
136
139
|
featureFlag: NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF,
|
|
137
|
-
}
|
|
140
|
+
});
|
|
138
141
|
const startTime = performance.now();
|
|
139
142
|
let scopedActionResponseObjects;
|
|
140
143
|
let apiType;
|
|
141
144
|
if (shouldNavigateToGraph) {
|
|
142
145
|
apiType = 'graph';
|
|
143
|
-
|
|
146
|
+
console.log('AUTH-DEBUG: using graph API flow', { accountId, userId, apiType });
|
|
144
147
|
scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
|
|
145
148
|
}
|
|
146
149
|
else {
|
|
147
150
|
apiType = 'platform';
|
|
148
|
-
|
|
151
|
+
console.log('AUTH-DEBUG: using platform API flow', { accountId, userId, apiType });
|
|
149
152
|
const profile = this.getProfile(accountId, userId);
|
|
150
153
|
const internalAuthToken = AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
|
|
151
154
|
scopedActionResponseObjects = await this.platformApi.checkPermissions(profile, internalAuthToken, userId, scopedActions);
|
package/package.json
CHANGED
|
@@ -161,17 +161,11 @@ export class AuthorizationService {
|
|
|
161
161
|
[]
|
|
162
162
|
);
|
|
163
163
|
const isAllowedProfile = allowedProfiles.includes(appName);
|
|
164
|
-
|
|
165
|
-
{ tag: 'auth-debug', accountId, userId, appName, allowedProfiles, isAllowedProfile },
|
|
166
|
-
'AuthorizationService.getProfile: checking allowed profiles'
|
|
167
|
-
);
|
|
164
|
+
console.log('AUTH-DEBUG: getProfile called', { accountId, userId, appName, allowedProfiles, isAllowedProfile });
|
|
168
165
|
|
|
169
166
|
if (isAllowedProfile) {
|
|
170
167
|
const profile = getProfile();
|
|
171
|
-
|
|
172
|
-
{ tag: 'auth-debug', accountId, userId, appName, profile },
|
|
173
|
-
'AuthorizationService.getProfile: selected profile via allowed profiles'
|
|
174
|
-
);
|
|
168
|
+
console.log('AUTH-DEBUG: selected profile via allowed profiles', { accountId, userId, appName, profile });
|
|
175
169
|
return profile;
|
|
176
170
|
}
|
|
177
171
|
|
|
@@ -182,33 +176,28 @@ export class AuthorizationService {
|
|
|
182
176
|
const isInReleaseProfile = inReleaseProfiles.includes(appName);
|
|
183
177
|
const isFeatureFlagReleased = this.igniteClient.isReleased(PLATFORM_PROFILE_RELEASE_FF, { accountId, userId });
|
|
184
178
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
featureFlag: PLATFORM_PROFILE_RELEASE_FF,
|
|
195
|
-
},
|
|
196
|
-
'AuthorizationService.getProfile: checking feature flag release'
|
|
197
|
-
);
|
|
179
|
+
console.log('AUTH-DEBUG: checking feature flag release', {
|
|
180
|
+
accountId,
|
|
181
|
+
userId,
|
|
182
|
+
appName,
|
|
183
|
+
inReleaseProfiles,
|
|
184
|
+
isInReleaseProfile,
|
|
185
|
+
isFeatureFlagReleased,
|
|
186
|
+
featureFlag: PLATFORM_PROFILE_RELEASE_FF,
|
|
187
|
+
});
|
|
198
188
|
|
|
199
189
|
if (isInReleaseProfile && isFeatureFlagReleased) {
|
|
200
190
|
const profile = getProfile();
|
|
201
|
-
|
|
202
|
-
{ tag: 'auth-debug', accountId, userId, appName, profile },
|
|
203
|
-
'AuthorizationService.getProfile: selected profile via feature flag release'
|
|
204
|
-
);
|
|
191
|
+
console.log('AUTH-DEBUG: selected profile via feature flag release', { accountId, userId, appName, profile });
|
|
205
192
|
return profile;
|
|
206
193
|
}
|
|
207
194
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
195
|
+
console.log('AUTH-DEBUG: selected default APP profile', {
|
|
196
|
+
accountId,
|
|
197
|
+
userId,
|
|
198
|
+
appName,
|
|
199
|
+
profile: PlatformProfile.APP,
|
|
200
|
+
});
|
|
212
201
|
return PlatformProfile.APP;
|
|
213
202
|
}
|
|
214
203
|
|
|
@@ -225,16 +214,12 @@ export class AuthorizationService {
|
|
|
225
214
|
this.igniteClient?.isReleased(NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF, { accountId, userId })
|
|
226
215
|
);
|
|
227
216
|
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
featureFlag: NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF,
|
|
235
|
-
},
|
|
236
|
-
'AuthorizationService.canActionInScopeMultiple: determining which API flow to use'
|
|
237
|
-
);
|
|
217
|
+
console.log('AUTH-DEBUG: determining which API flow to use', {
|
|
218
|
+
accountId,
|
|
219
|
+
userId,
|
|
220
|
+
shouldNavigateToGraph,
|
|
221
|
+
featureFlag: NAVIGATE_CAN_ACTION_IN_SCOPE_TO_GRAPH_FF,
|
|
222
|
+
});
|
|
238
223
|
|
|
239
224
|
const startTime = performance.now();
|
|
240
225
|
let scopedActionResponseObjects: ScopedActionResponseObject[];
|
|
@@ -242,17 +227,11 @@ export class AuthorizationService {
|
|
|
242
227
|
|
|
243
228
|
if (shouldNavigateToGraph) {
|
|
244
229
|
apiType = 'graph';
|
|
245
|
-
|
|
246
|
-
{ tag: 'auth-debug', accountId, userId, apiType },
|
|
247
|
-
'AuthorizationService.canActionInScopeMultiple: using graph API flow'
|
|
248
|
-
);
|
|
230
|
+
console.log('AUTH-DEBUG: using graph API flow', { accountId, userId, apiType });
|
|
249
231
|
scopedActionResponseObjects = await this.graphApi.checkPermissions(accountId, userId, scopedActions);
|
|
250
232
|
} else {
|
|
251
233
|
apiType = 'platform';
|
|
252
|
-
|
|
253
|
-
{ tag: 'auth-debug', accountId, userId, apiType },
|
|
254
|
-
'AuthorizationService.canActionInScopeMultiple: using platform API flow'
|
|
255
|
-
);
|
|
234
|
+
console.log('AUTH-DEBUG: using platform API flow', { accountId, userId, apiType });
|
|
256
235
|
const profile = this.getProfile(accountId, userId);
|
|
257
236
|
const internalAuthToken = AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
|
|
258
237
|
|