Browse Source
Bugfix/fix permissions of impersonation mode in overview and holdings tabs (#5239)
* Fix permissions of impersonation mode
* Update changelog
pull/5245/head^2
Thomas Kaul
3 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with
26 additions and
13 deletions
-
CHANGELOG.md
-
apps/client/src/app/app.component.ts
-
apps/client/src/app/components/account-detail-dialog/account-detail-dialog.html
-
apps/client/src/app/components/account-detail-dialog/interfaces/interfaces.ts
-
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
-
apps/client/src/app/components/holding-detail-dialog/interfaces/interfaces.ts
-
apps/client/src/app/components/home-holdings/home-holdings.component.ts
-
apps/client/src/app/components/home-holdings/home-holdings.html
-
apps/client/src/app/components/home-overview/home-overview.component.ts
-
apps/client/src/app/components/home-overview/home-overview.html
-
apps/client/src/app/pages/accounts/accounts-page.component.ts
-
apps/client/src/app/pages/portfolio/allocations/allocations-page.component.ts
|
@ -20,6 +20,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
- Upgraded `Nx` from version `21.1.2` to `21.2.4` |
|
|
- Upgraded `Nx` from version `21.1.2` to `21.2.4` |
|
|
- Upgraded `storybook` from version `8.6.12` to `9.0.17` |
|
|
- Upgraded `storybook` from version `8.6.12` to `9.0.17` |
|
|
|
|
|
|
|
|
|
|
|
### Fixed |
|
|
|
|
|
|
|
|
|
|
|
- Fixed an issue with the permissions of the impersonation mode related to the onboarding on the overview tab of the home page |
|
|
|
|
|
- Fixed an issue with the permissions of the impersonation mode related to the manage activities button of the holdings tab on the home page |
|
|
|
|
|
|
|
|
## 2.184.0 - 2025-07-22 |
|
|
## 2.184.0 - 2025-07-22 |
|
|
|
|
|
|
|
|
### Added |
|
|
### Added |
|
|
|
@ -324,7 +324,7 @@ export class AppComponent implements OnDestroy, OnInit { |
|
|
this.user?.permissions, |
|
|
this.user?.permissions, |
|
|
permissions.accessAdminControl |
|
|
permissions.accessAdminControl |
|
|
), |
|
|
), |
|
|
hasPermissionToCreateOrder: |
|
|
hasPermissionToCreateActivity: |
|
|
!this.hasImpersonationId && |
|
|
!this.hasImpersonationId && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
!this.user?.settings?.isRestrictedView, |
|
|
!this.user?.settings?.isRestrictedView, |
|
|
|
@ -105,7 +105,7 @@ |
|
|
[locale]="user?.settings?.locale" |
|
|
[locale]="user?.settings?.locale" |
|
|
[showActions]=" |
|
|
[showActions]=" |
|
|
!data.hasImpersonationId && |
|
|
!data.hasImpersonationId && |
|
|
data.hasPermissionToCreateOrder && |
|
|
data.hasPermissionToCreateActivity && |
|
|
user?.settings?.isExperimentalFeatures && |
|
|
user?.settings?.isExperimentalFeatures && |
|
|
!user?.settings?.isRestrictedView |
|
|
!user?.settings?.isRestrictedView |
|
|
" |
|
|
" |
|
|
|
@ -2,5 +2,5 @@ export interface AccountDetailDialogParams { |
|
|
accountId: string; |
|
|
accountId: string; |
|
|
deviceType: string; |
|
|
deviceType: string; |
|
|
hasImpersonationId: boolean; |
|
|
hasImpersonationId: boolean; |
|
|
hasPermissionToCreateOrder: boolean; |
|
|
hasPermissionToCreateActivity: boolean; |
|
|
} |
|
|
} |
|
|
|
@ -350,7 +350,7 @@ |
|
|
[locale]="data.locale" |
|
|
[locale]="data.locale" |
|
|
[showActions]=" |
|
|
[showActions]=" |
|
|
!data.hasImpersonationId && |
|
|
!data.hasImpersonationId && |
|
|
data.hasPermissionToCreateOrder && |
|
|
data.hasPermissionToCreateActivity && |
|
|
user?.settings?.isExperimentalFeatures && |
|
|
user?.settings?.isExperimentalFeatures && |
|
|
!user?.settings?.isRestrictedView |
|
|
!user?.settings?.isRestrictedView |
|
|
" |
|
|
" |
|
|
|
@ -9,7 +9,7 @@ export interface HoldingDetailDialogParams { |
|
|
deviceType: string; |
|
|
deviceType: string; |
|
|
hasImpersonationId: boolean; |
|
|
hasImpersonationId: boolean; |
|
|
hasPermissionToAccessAdminControl: boolean; |
|
|
hasPermissionToAccessAdminControl: boolean; |
|
|
hasPermissionToCreateOrder: boolean; |
|
|
hasPermissionToCreateActivity: boolean; |
|
|
hasPermissionToReportDataGlitch: boolean; |
|
|
hasPermissionToReportDataGlitch: boolean; |
|
|
hasPermissionToUpdateOrder: boolean; |
|
|
hasPermissionToUpdateOrder: boolean; |
|
|
locale: string; |
|
|
locale: string; |
|
|
|
@ -57,7 +57,7 @@ export class GfHomeHoldingsComponent implements OnDestroy, OnInit { |
|
|
public deviceType: string; |
|
|
public deviceType: string; |
|
|
public hasImpersonationId: boolean; |
|
|
public hasImpersonationId: boolean; |
|
|
public hasPermissionToAccessHoldingsChart: boolean; |
|
|
public hasPermissionToAccessHoldingsChart: boolean; |
|
|
public hasPermissionToCreateOrder: boolean; |
|
|
public hasPermissionToCreateActivity: boolean; |
|
|
public holdings: PortfolioPosition[]; |
|
|
public holdings: PortfolioPosition[]; |
|
|
public holdingType: HoldingType = 'ACTIVE'; |
|
|
public holdingType: HoldingType = 'ACTIVE'; |
|
|
public holdingTypeOptions: ToggleOption[] = [ |
|
|
public holdingTypeOptions: ToggleOption[] = [ |
|
@ -105,7 +105,7 @@ export class GfHomeHoldingsComponent implements OnDestroy, OnInit { |
|
|
permissions.accessHoldingsChart |
|
|
permissions.accessHoldingsChart |
|
|
); |
|
|
); |
|
|
|
|
|
|
|
|
this.hasPermissionToCreateOrder = hasPermission( |
|
|
this.hasPermissionToCreateActivity = hasPermission( |
|
|
this.user.permissions, |
|
|
this.user.permissions, |
|
|
permissions.createOrder |
|
|
permissions.createOrder |
|
|
); |
|
|
); |
|
|
|
@ -52,7 +52,11 @@ |
|
|
[locale]="user?.settings?.locale" |
|
|
[locale]="user?.settings?.locale" |
|
|
(holdingClicked)="onHoldingClicked($event)" |
|
|
(holdingClicked)="onHoldingClicked($event)" |
|
|
/> |
|
|
/> |
|
|
@if (hasPermissionToCreateOrder && holdings?.length > 0) { |
|
|
@if ( |
|
|
|
|
|
!hasImpersonationId && |
|
|
|
|
|
hasPermissionToCreateActivity && |
|
|
|
|
|
holdings?.length > 0 |
|
|
|
|
|
) { |
|
|
<div class="text-center"> |
|
|
<div class="text-center"> |
|
|
<a |
|
|
<a |
|
|
class="mt-3" |
|
|
class="mt-3" |
|
|
|
@ -48,7 +48,7 @@ export class GfHomeOverviewComponent implements OnDestroy, OnInit { |
|
|
public errors: AssetProfileIdentifier[]; |
|
|
public errors: AssetProfileIdentifier[]; |
|
|
public hasError: boolean; |
|
|
public hasError: boolean; |
|
|
public hasImpersonationId: boolean; |
|
|
public hasImpersonationId: boolean; |
|
|
public hasPermissionToCreateOrder: boolean; |
|
|
public hasPermissionToCreateActivity: boolean; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public historicalDataItems: LineChartItem[]; |
|
|
public isAllTimeHigh: boolean; |
|
|
public isAllTimeHigh: boolean; |
|
|
public isAllTimeLow: boolean; |
|
|
public isAllTimeLow: boolean; |
|
@ -80,7 +80,7 @@ export class GfHomeOverviewComponent implements OnDestroy, OnInit { |
|
|
if (state?.user) { |
|
|
if (state?.user) { |
|
|
this.user = state.user; |
|
|
this.user = state.user; |
|
|
|
|
|
|
|
|
this.hasPermissionToCreateOrder = hasPermission( |
|
|
this.hasPermissionToCreateActivity = hasPermission( |
|
|
this.user.permissions, |
|
|
this.user.permissions, |
|
|
permissions.createOrder |
|
|
permissions.createOrder |
|
|
); |
|
|
); |
|
|
|
@ -1,7 +1,11 @@ |
|
|
<div |
|
|
<div |
|
|
class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative" |
|
|
class="align-items-center container d-flex flex-column h-100 justify-content-center overview p-0 position-relative" |
|
|
> |
|
|
> |
|
|
@if (hasPermissionToCreateOrder && user?.activitiesCount === 0) { |
|
|
@if ( |
|
|
|
|
|
!hasImpersonationId && |
|
|
|
|
|
hasPermissionToCreateActivity && |
|
|
|
|
|
user?.activitiesCount === 0 |
|
|
|
|
|
) { |
|
|
<div class="justify-content-center row w-100"> |
|
|
<div class="justify-content-center row w-100"> |
|
|
<div class="col introduction"> |
|
|
<div class="col introduction"> |
|
|
<h4 i18n>Welcome to Ghostfolio</h4> |
|
|
<h4 i18n>Welcome to Ghostfolio</h4> |
|
|
|
@ -239,7 +239,7 @@ export class GfAccountsPageComponent implements OnDestroy, OnInit { |
|
|
accountId: aAccountId, |
|
|
accountId: aAccountId, |
|
|
deviceType: this.deviceType, |
|
|
deviceType: this.deviceType, |
|
|
hasImpersonationId: this.hasImpersonationId, |
|
|
hasImpersonationId: this.hasImpersonationId, |
|
|
hasPermissionToCreateOrder: |
|
|
hasPermissionToCreateActivity: |
|
|
!this.hasImpersonationId && |
|
|
!this.hasImpersonationId && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
!this.user?.settings?.isRestrictedView |
|
|
!this.user?.settings?.isRestrictedView |
|
|
|
@ -564,7 +564,7 @@ export class GfAllocationsPageComponent implements OnDestroy, OnInit { |
|
|
accountId: aAccountId, |
|
|
accountId: aAccountId, |
|
|
deviceType: this.deviceType, |
|
|
deviceType: this.deviceType, |
|
|
hasImpersonationId: this.hasImpersonationId, |
|
|
hasImpersonationId: this.hasImpersonationId, |
|
|
hasPermissionToCreateOrder: |
|
|
hasPermissionToCreateActivity: |
|
|
!this.hasImpersonationId && |
|
|
!this.hasImpersonationId && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
hasPermission(this.user?.permissions, permissions.createOrder) && |
|
|
!this.user?.settings?.isRestrictedView |
|
|
!this.user?.settings?.isRestrictedView |
|
|