Browse Source
Feature/restrict permissions of demo user (#4697)
* Restrict permissions of demo user
* Update changelog
pull/4707/head^2
Thomas Kaul
2 months ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with
6 additions and
3 deletions
-
CHANGELOG.md
-
apps/api/src/app/user/user.service.ts
|
|
@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
### Changed |
|
|
|
|
|
|
|
- Harmonized the data providers management style of the admin control panel |
|
|
|
- Restricted the permissions of the demo user |
|
|
|
- Renamed `Order` to `activities` in the `User` database schema |
|
|
|
- Improved the language localization for Catalan (`ca`) |
|
|
|
- Improved the language localization for Chinese (`zh`) |
|
|
|
|
|
@ -394,9 +394,11 @@ export class UserService { |
|
|
|
// Reset holdings view mode
|
|
|
|
user.Settings.settings.holdingsViewMode = undefined; |
|
|
|
} else if (user.subscription?.type === 'Premium') { |
|
|
|
currentPermissions.push(permissions.createApiKey); |
|
|
|
currentPermissions.push(permissions.enableDataProviderGhostfolio); |
|
|
|
currentPermissions.push(permissions.reportDataGlitch); |
|
|
|
if (!hasRole(user, Role.DEMO)) { |
|
|
|
currentPermissions.push(permissions.createApiKey); |
|
|
|
currentPermissions.push(permissions.enableDataProviderGhostfolio); |
|
|
|
currentPermissions.push(permissions.reportDataGlitch); |
|
|
|
} |
|
|
|
|
|
|
|
currentPermissions = without( |
|
|
|
currentPermissions, |
|
|
|