diff --git a/apps/api/src/app/user/user.service.ts b/apps/api/src/app/user/user.service.ts index c5cc3c8ce..a2710bfd5 100644 --- a/apps/api/src/app/user/user.service.ts +++ b/apps/api/src/app/user/user.service.ts @@ -19,7 +19,7 @@ import { UserWithSettings } from '@ghostfolio/common/types'; import { Injectable } from '@nestjs/common'; import { Prisma, Role, User } from '@prisma/client'; import { differenceInDays } from 'date-fns'; -import { sortBy } from 'lodash'; +import { sortBy, without } from 'lodash'; const crypto = require('crypto'); @@ -188,6 +188,11 @@ export class UserService { currentPermissions.push(permissions.enableSubscriptionInterstitial); } + currentPermissions = without( + currentPermissions, + permissions.createAccess + ); + // Reset benchmark user.Settings.settings.benchmark = undefined; } 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 589c67e1f..498e73bf0 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 @@ -1,3 +1,15 @@ +
+ + Add Access + +
+ 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 c0db8fb2f..298a02069 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 @@ -19,6 +19,7 @@ import { Access } from '@ghostfolio/common/interfaces'; }) export class AccessTableComponent implements OnChanges, OnInit { @Input() accesses: Access[]; + @Input() hasPermissionToCreateAccess = false; @Input() showActions: boolean; @Output() accessDeleted = new EventEmitter(); diff --git a/apps/client/src/app/components/access-table/access-table.module.ts b/apps/client/src/app/components/access-table/access-table.module.ts index 111f0e2f4..2ace3cfc1 100644 --- a/apps/client/src/app/components/access-table/access-table.module.ts +++ b/apps/client/src/app/components/access-table/access-table.module.ts @@ -3,13 +3,20 @@ import { CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { MatMenuModule } from '@angular/material/menu'; import { MatTableModule } from '@angular/material/table'; +import { RouterModule } from '@angular/router'; import { AccessTableComponent } from './access-table.component'; @NgModule({ declarations: [AccessTableComponent], exports: [AccessTableComponent], - imports: [CommonModule, MatButtonModule, MatMenuModule, MatTableModule], + imports: [ + CommonModule, + MatButtonModule, + MatMenuModule, + MatTableModule, + RouterModule + ], schemas: [CUSTOM_ELEMENTS_SCHEMA] }) export class GfPortfolioAccessTableModule {} diff --git a/apps/client/src/app/pages/user-account/user-account-page.html b/apps/client/src/app/pages/user-account/user-account-page.html index 24cfce6e1..33c4e497e 100644 --- a/apps/client/src/app/pages/user-account/user-account-page.html +++ b/apps/client/src/app/pages/user-account/user-account-page.html @@ -287,24 +287,19 @@
-

Granted Access

+

+ Granted Access + +

- -
- - - -
diff --git a/apps/client/src/app/pages/user-account/user-account-page.scss b/apps/client/src/app/pages/user-account/user-account-page.scss index 6a010a85d..6dddf0e35 100644 --- a/apps/client/src/app/pages/user-account/user-account-page.scss +++ b/apps/client/src/app/pages/user-account/user-account-page.scss @@ -6,13 +6,6 @@ overflow-x: auto; } - .fab-container { - position: fixed; - right: 2rem; - bottom: 2rem; - z-index: 999; - } - .hint-text { font-size: 90%; line-height: 1.2;
Alias