mirror of
https://github.com/bitwarden/browser.git
synced 2024-12-22 16:29:09 +01:00
[EC-1086] The Remove individual vault Enterprise Policy prevents Service Users and Provider admins from creating new vault items via the Provider Portal. (#4909)
* [EC-1086] fix: faulty orgId override When single vault policy was in effect the orgId that the user belongs to was was always set for new ciphers for new ciphers. This was overwriting the client organization's id when a provider was trying to create new items in their clients vault. * [AC-1086] chore: remove uneccessary assignments
This commit is contained in:
parent
f592963191
commit
6a6a47b52f
@ -223,7 +223,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
await this.editCipher(null, (comp) => {
|
||||
comp.organizationId = this.organization.id;
|
||||
comp.type = this.activeFilter.cipherType;
|
||||
comp.collections = collections;
|
||||
if (this.activeFilter.collectionId) {
|
||||
@ -257,6 +256,7 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
|
||||
const defaultComponentParameters = (comp: AddEditComponent) => {
|
||||
comp.organization = this.organization;
|
||||
comp.organizationId = this.organization.id;
|
||||
comp.cipherId = cipherId;
|
||||
// eslint-disable-next-line rxjs-angular/prefer-takeuntil, rxjs/no-async-subscribe
|
||||
comp.onSavedCipher.subscribe(async () => {
|
||||
@ -301,7 +301,6 @@ export class VaultComponent implements OnInit, OnDestroy {
|
||||
await this.editCipher(cipher, (comp) => {
|
||||
comp.cloneMode = true;
|
||||
comp.collections = collections;
|
||||
comp.organizationId = this.organization.id;
|
||||
comp.collectionIds = cipher.collectionIds;
|
||||
});
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
this.ownershipOptions.push({ name: o.name, value: o.id });
|
||||
}
|
||||
});
|
||||
if (!this.allowPersonal) {
|
||||
if (!this.allowPersonal && this.organizationId == undefined) {
|
||||
this.organizationId = this.defaultOwnerId;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user