mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-18 05:52:51 +00:00
fix: Improve Actions V2 Texts and reenable in settings (#9814)
# Which Problems Are Solved This pr includes improved texts to make the usage of Actions V2 more easy. Since the removal of the Actions V2 Feature Flag we removed the code that checks if it's enabled in the settings sidenav. # How the Problems Are Solved Added new texts to translations. Removed sidenav logic that checks for Actions V2 Feature Flag # Additional Context - Part of #7248 - Part of #9688 --------- Co-authored-by: Max Peintner <[email protected]> Co-authored-by: Max Peintner <[email protected]>
This commit is contained in:
co-authored by
Max Peintner
Max Peintner
parent
ce823c9176
commit
d930a09cb0
@@ -42,8 +42,6 @@ import { SidenavSetting } from 'src/app/modules/sidenav/sidenav.component';
|
||||
import { GrpcAuthService } from 'src/app/services/grpc-auth.service';
|
||||
import { EnvironmentService } from 'src/app/services/environment.service';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { NewFeatureService } from '../../services/new-feature.service';
|
||||
import { withLatestFromSynchronousFix } from '../../utils/withLatestFromSynchronousFix';
|
||||
@Component({
|
||||
selector: 'cnsl-instance',
|
||||
templateUrl: './instance.component.html',
|
||||
@@ -106,7 +104,6 @@ export class InstanceComponent {
|
||||
private readonly envService: EnvironmentService,
|
||||
activatedRoute: ActivatedRoute,
|
||||
private readonly destroyRef: DestroyRef,
|
||||
private readonly featureService: NewFeatureService,
|
||||
) {
|
||||
this.loadMembers();
|
||||
|
||||
@@ -139,32 +136,7 @@ export class InstanceComponent {
|
||||
}
|
||||
|
||||
private getSettingsList(): Observable<SidenavSetting[]> {
|
||||
const features$ = this.getFeatures().pipe(shareReplay({ refCount: true, bufferSize: 1 }));
|
||||
|
||||
const actionsEnabled$ = features$.pipe(map((features) => features?.actions?.enabled));
|
||||
|
||||
return this.authService
|
||||
.isAllowedMapper(this.defaultSettingsList, (setting) => setting.requiredRoles.admin || [])
|
||||
.pipe(
|
||||
withLatestFromSynchronousFix(actionsEnabled$),
|
||||
map(([settings, actionsEnabled]) =>
|
||||
settings
|
||||
.filter((setting) => actionsEnabled || setting.id !== ACTIONS.id)
|
||||
.filter((setting) => actionsEnabled || setting.id !== ACTIONS_TARGETS.id),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
private getFeatures() {
|
||||
return defer(() => this.featureService.getInstanceFeatures()).pipe(
|
||||
timeout(1000),
|
||||
catchError((error) => {
|
||||
if (!(error instanceof TimeoutError)) {
|
||||
this.toast.showError(error);
|
||||
}
|
||||
return of(undefined);
|
||||
}),
|
||||
);
|
||||
return this.authService.isAllowedMapper(this.defaultSettingsList, (setting) => setting.requiredRoles.admin || []);
|
||||
}
|
||||
|
||||
public loadMembers(): void {
|
||||
|
||||
Reference in New Issue
Block a user