mirror of
https://github.com/bitwarden/browser
synced 2025-12-18 09:13:33 +00:00
[SM-896] When org is disabled disable the logic and show warning symbols (#6225)
* When org is disabled disable the logic and show warning symbols * fixing org enabled logic * removing unused code * Adding route gaurd logic and new org suspended page * fixing lint issue * fixing issues * Requested changes * adding back code that was accidentally removed from organization-switcher * Update bitwarden_license/bit-web/src/app/secrets-manager/shared/org-suspended.component.ts Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> * Removing unused code and updating storybook to set enabled:true * removing onDestroy * Will's suggestions * will's suggested change * fix nav-item color in story * Thomas Rittson's suggested changes * adding back removed spaces * Adding back white space * updating guard * Update bitwarden_license/bit-web/src/app/secrets-manager/guards/sm-org-enabled.guard.ts Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com> * removing ununsed data * Updating incorrect messages --------- Co-authored-by: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Co-authored-by: William Martin <contact@willmartian.com> Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
This commit is contained in:
@@ -12,6 +12,7 @@ import {
|
||||
takeUntil,
|
||||
} from "rxjs";
|
||||
|
||||
import { OrganizationService } from "@bitwarden/common/admin-console/abstractions/organization/organization.service.abstraction";
|
||||
import { I18nService } from "@bitwarden/common/platform/abstractions/i18n.service";
|
||||
import { PlatformUtilsService } from "@bitwarden/common/platform/abstractions/platform-utils.service";
|
||||
import { DialogService } from "@bitwarden/components";
|
||||
@@ -33,7 +34,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
||||
|
||||
private organizationId: string;
|
||||
private projectId: string;
|
||||
|
||||
private organizationEnabled: boolean;
|
||||
private destroy$ = new Subject<void>();
|
||||
|
||||
constructor(
|
||||
@@ -42,7 +43,8 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
||||
private router: Router,
|
||||
private dialogService: DialogService,
|
||||
private platformUtilsService: PlatformUtilsService,
|
||||
private i18nService: I18nService
|
||||
private i18nService: I18nService,
|
||||
private organizationService: OrganizationService
|
||||
) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
@@ -69,6 +71,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
||||
this.route.params.pipe(takeUntil(this.destroy$)).subscribe((params) => {
|
||||
this.organizationId = params.organizationId;
|
||||
this.projectId = params.projectId;
|
||||
this.organizationEnabled = this.organizationService.get(params.organizationId)?.enabled;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -82,6 +85,7 @@ export class ProjectComponent implements OnInit, OnDestroy {
|
||||
data: {
|
||||
organizationId: this.organizationId,
|
||||
operation: OperationType.Edit,
|
||||
organizationEnabled: this.organizationEnabled,
|
||||
projectId: this.projectId,
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user