Skip to content
This repository was archived by the owner on Mar 8, 2024. It is now read-only.

Commit 90550b2

Browse files
author
JWittmeyer
committed
Changes logic slightly admins
1 parent 66bfa53 commit 90550b2

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

src/app/base/components/header/header.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
</a>
6060
</div>
6161
<div class="flex justify-center overflow-visible">
62-
<div *ngIf="user && !isDemo" class="dropdown dropdown-right dropdown-end mr-4">
62+
<div *ngIf="user && !hideLogout" class="dropdown dropdown-right dropdown-end mr-4">
6363
<a tabindex="0" class="w-full cursor-pointer">
6464
<div data-intercom-target="User Avatar Button" (isMenuOpen)="toggleVisible($event, menuButton)"
6565
appDropdown>

src/app/base/components/header/header.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
2121
subscriptions$: Subscription[] = [];
2222

2323
showConfigSettings: boolean = false;
24-
isDemo: boolean;
24+
hideLogout: boolean;
2525

2626
constructor(private auth: AuthApiService,
2727
private router: Router) { }
@@ -34,7 +34,7 @@ export class HeaderComponent implements OnInit, OnDestroy {
3434
timer(250).subscribe(() => this.setShowConfig());
3535
return;
3636
}
37-
this.isDemo = ConfigManager.getIsDemo();
37+
this.hideLogout = ConfigManager.getIsDemo() && !ConfigManager.getIsAdmin();
3838
this.showConfigSettings = !ConfigManager.getIsManaged();
3939
}
4040

src/app/base/services/base/apollo-checker.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export class ApolloChecker {
3030

3131
private static checkBlackWhiteList(type: string, queryText: string) {
3232
if (!ConfigManager.getIsDemo()) return;
33+
if (ConfigManager.getIsAdmin()) return;
3334
if (!queryText) throw new Error("Can't find query text");
3435
if (!ConfigManager.checkBlackWhiteList(type, queryText)) throw new DemoError(type, queryText);
3536
}

src/app/base/services/project/project-mutations.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ export const mutations = {
185185
`,
186186
CREATE_OUTLIER_SLICE: gql`
187187
mutation($projectId: ID!, $embeddingId: ID!){
188-
createOulierSlice(projectId: $projectId, embeddingId: $embeddingId) {
188+
createOutlierSlice(projectId: $projectId, embeddingId: $embeddingId) {
189189
ok
190190
}
191191
}

0 commit comments

Comments
 (0)