Skip to content

Commit 2b5e30f

Browse files
removed cr auth logic
1 parent e02c4d3 commit 2b5e30f

File tree

2 files changed

+1
-29
lines changed

2 files changed

+1
-29
lines changed

public/app/core/services/backend_srv.ts

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,6 @@ export class BackendSrv implements BackendService {
189189
return lastValueFrom(this.fetch<T>(options));
190190
}
191191

192-
private getCodeRabbitOrg(): { id: string } | null {
193-
const selectedOrgStorage = sessionStorage.getItem('selected_org');
194-
195-
try {
196-
return selectedOrgStorage ? (JSON.parse(selectedOrgStorage) as { id: string }) : null;
197-
} catch (e) {
198-
console.error('Failed to parse selected_org', selectedOrgStorage, 'error:', e);
199-
sessionStorage.removeItem('selected_org');
200-
return null;
201-
}
202-
}
203-
204192
private parseRequestOptions(options: BackendSrvRequest): BackendSrvRequest {
205193
const orgId = this.dependencies.contextSrv.user?.orgId;
206194

@@ -213,26 +201,10 @@ export class BackendSrv implements BackendService {
213201
options.headers['X-Grafana-Org-Id'] = orgId;
214202
}
215203

216-
const codeRabbitOrg = this.getCodeRabbitOrg();
217-
if (codeRabbitOrg) {
218-
options.headers = options.headers ?? {};
219-
options.headers['x-coderabbit-organization'] = codeRabbitOrg.id;
220-
const firebaseTenantId = sessionStorage.getItem('firebaseTenantId');
221-
if(firebaseTenantId){
222-
options.headers['x-tenant-id'] = firebaseTenantId;
223-
}
224-
}
225-
226204
if (options.url.startsWith('/')) {
227205
options.url = options.url.substring(1);
228206
}
229207

230-
const codeRabbitToken = sessionStorage.getItem('accessToken');
231-
if (codeRabbitToken) {
232-
options.headers = options.headers ?? {};
233-
options.headers['x-coderabbit-token'] = `Bearer ${codeRabbitToken}`;
234-
}
235-
236208
if (options.headers?.Authorization) {
237209
options.headers['X-DS-Authorization'] = options.headers.Authorization;
238210
delete options.headers.Authorization;

public/microfrontends/fn_dashboard/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
<script nonce="" src="../../../public/build/runtime~fn_dashboard.551314fa089c5f51c211.js" type="text/javascript"></script>
2121

22-
<script nonce="" src="../../../public/build/fn_dashboard.15111f340ab26edd5bf8.js" type="text/javascript"></script>
22+
<script nonce="" src="../../../public/build/fn_dashboard.40eafadbed9530afa04b.js" type="text/javascript"></script>
2323

2424
</body>
2525
</html>

0 commit comments

Comments
 (0)