diff --git a/apps/client/src/app/components/access-table/access-table.component.html b/apps/client/src/app/components/access-table/access-table.component.html index ea1f2c904e..b8c2f8422d 100644 --- a/apps/client/src/app/components/access-table/access-table.component.html +++ b/apps/client/src/app/components/access-table/access-table.component.html @@ -83,14 +83,6 @@ } - @if (element.type === 'MCP' && hasPermissionToEnableMcp) { - - } @if ( (!isReceivedAccess() && user()?.settings?.isExperimentalFeatures) || element.type === 'PUBLIC' || diff --git a/apps/client/src/app/components/access-table/access-table.component.ts b/apps/client/src/app/components/access-table/access-table.component.ts index b35f4ebf8a..9b666b3b62 100644 --- a/apps/client/src/app/components/access-table/access-table.component.ts +++ b/apps/client/src/app/components/access-table/access-table.component.ts @@ -130,18 +130,6 @@ export class GfAccessTableComponent { return `${this.baseUrl}/${languageCode}/${publicRoutes.public.path}/${aId}`; } - protected onCopyTokenToClipboard(aId: string) { - this.clipboard.copy(aId); - - this.snackBar.open( - '✅ ' + $localize`Token has been copied to the clipboard`, - undefined, - { - duration: ms('3 seconds') - } - ); - } - protected onCopyUrlToClipboard(aId: string) { this.clipboard.copy(this.getPublicUrl(aId)); diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts index 2fd7cac2d8..64858802dd 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts @@ -27,6 +27,7 @@ import { } from '@ghostfolio/ui/portfolio-filter-form'; import { DataService } from '@ghostfolio/ui/services'; +import { JsonPipe } from '@angular/common'; import type { HttpErrorResponse } from '@angular/common/http'; import { ChangeDetectionStrategy, @@ -69,6 +70,7 @@ import { CreateOrUpdateAccessDialogParams } from './interfaces/interfaces'; FormsModule, GfAccessLevelIconComponent, GfPortfolioFilterFormComponent, + JsonPipe, MatButtonModule, MatDatepickerModule, MatDialogModule, @@ -89,7 +91,6 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit { protected accessForm: FormGroup; protected readonly baseUrl = window.location.origin; - protected readonly mcpEndpoint = MCP_ENDPOINT; protected minExpiresAt: Date; protected readonly mode: 'create' | 'update'; protected readonly today = startOfDay(new Date()); @@ -244,6 +245,16 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit { return this.accessType === 'PUBLIC'; } + protected get mcpConfiguration() { + return { + headers: { + Authorization: `Bearer ${this.accessId}` + }, + type: 'https', + url: `${this.baseUrl}${MCP_ENDPOINT}` + }; + } + protected get showExpiresAtErrorMessage() { return this.accessForm?.get('expiresAt')?.invalid === true; } diff --git a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html index b0858bf8d8..31391beb0f 100644 --- a/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html +++ b/apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html @@ -136,12 +136,7 @@ @if (showMcpDetails || showPublicDetails) {
{{ baseUrl }}{{ mcpEndpoint }}
- Authorization: Bearer {{ accessId }}
- {{ mcpConfiguration | json }}
} @else if (showPublicDetails) {