Browse Source

Move details of granted access

pull/7792/head
Thomas Kaul 1 month ago
parent
commit
a1fa471716
  1. 17
      apps/client/src/app/components/access-table/access-table.component.ts
  2. 8
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts
  3. 8
      apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html

17
apps/client/src/app/components/access-table/access-table.component.ts

@ -80,15 +80,14 @@ export class GfAccessTableComponent {
protected readonly dataSource = new MatTableDataSource<Access>();
protected readonly displayedColumns = computed(() => {
const columns = ['alias', 'grantee', 'type', 'lastUsedAt', 'expiresAt'];
if (
this.accesses()?.some(({ type }) => {
return type === 'PUBLIC';
})
) {
columns.push('details');
}
const columns = [
'alias',
'grantee',
'type',
'lastUsedAt',
'expiresAt',
'details'
];
if (this.showActions()) {
columns.push('actions');

8
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.component.ts

@ -245,11 +245,7 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit {
}
protected get showMcpDetails() {
return (
this.accessType === 'MCP' &&
this.hasPermissionToEnableMcp &&
this.mode === 'update'
);
return this.canGrantMcpAccess && this.mode === 'update';
}
protected get showPublicDetails() {
@ -365,7 +361,7 @@ export class GfCreateOrUpdateAccessDialogComponent implements OnInit {
}
private async updateAccess() {
const accessId = this.data.access?.id;
const accessId = this.accessId;
if (!accessId) {
return;

8
apps/client/src/app/components/user-account-access/create-or-update-access-dialog/create-or-update-access-dialog.html

@ -137,14 +137,16 @@
<h2 class="h6" i18n>Details</h2>
@if (showMcpDetails) {
<div>
<code>{{ baseUrl }}{{ mcpEndpoint }}</code>
<code class="text-break">{{ baseUrl }}{{ mcpEndpoint }}</code>
</div>
<div>
<code>Authorization: Bearer {{ accessId }}</code>
<code class="text-break">Authorization: Bearer {{ accessId }}</code>
</div>
} @else if (showPublicDetails) {
<div>
<code>GET {{ baseUrl }}/api/v1/public/{{ accessId }}/portfolio</code>
<code class="text-break"
>GET {{ baseUrl }}/api/v1/public/{{ accessId }}/portfolio</code
>
</div>
}
}

Loading…
Cancel
Save