1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-15 07:43:35 +00:00

[PM-13449] Owner assignment/visibility in AC (#11588)

* Revert "remove logic for personal ownership, not needed in AC"

This reverts commit f04fef59f4.

* allow for ownership to be controlled from the admin console when cloning a cipher
This commit is contained in:
Nick Krantz
2024-11-01 14:15:36 -05:00
committed by GitHub
parent b0a73cfe45
commit f416c3ed49
4 changed files with 119 additions and 14 deletions

View File

@@ -163,9 +163,13 @@ export class ItemDetailsSectionComponent implements OnInit {
}
get showOwnership() {
return (
this.allowOwnershipChange || (this.organizations.length > 0 && this.config.mode === "edit")
);
// Show ownership field when editing with available orgs
const isEditingWithOrgs = this.organizations.length > 0 && this.config.mode === "edit";
// When in admin console, ownership should not be shown unless cloning
const isAdminConsoleEdit = this.config.isAdminConsole && this.config.mode !== "clone";
return this.allowOwnershipChange || (isEditingWithOrgs && !isAdminConsoleEdit);
}
get defaultOwner() {