mirror of
https://github.com/bitwarden/browser
synced 2025-12-15 15:53:27 +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:
@@ -82,6 +82,9 @@ type BaseCipherFormConfig = {
|
||||
|
||||
/** Hides the fields that are only applicable to individuals, useful in the Admin Console where folders aren't applicable */
|
||||
hideIndividualVaultFields?: true;
|
||||
|
||||
/** True when the config is built within the context of the Admin Console */
|
||||
isAdminConsole?: true;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user