mirror of
https://github.com/bitwarden/server
synced 2026-02-26 09:23:28 +00:00
[PM-32131] Add UseMyItems organization ability (#7014)
Purpose: UseMyItems is a new organization ability / plan flag which is automatically enabled where UsePolicies is enabled, but can be selectively disabled to disable My Items creation when the Organization Data Ownership policy is turned on. - new organization table column with all sprocs and views updated - data migration to enable the feature for all organizations that already use policies (replicating existing behaviour) - data and api models updated - added to organization license file so it can be preserved in self-hosted instances - note that we don't have a plan feature defined for this yet, so it is set based on UsePolicies to match the migration logic. Billing Team have a ticket to add this
This commit is contained in:
@@ -216,6 +216,7 @@ If you believe you need to change the version for a valid reason, please discuss
|
||||
UseAdminSponsoredFamilies = false,
|
||||
UseDisableSmAdsForUsers = false,
|
||||
UsePhishingBlocker = false,
|
||||
UseMyItems = false,
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -92,8 +92,7 @@ public class UpdateOrganizationLicenseCommandTests
|
||||
"Id", "MaxStorageGb", "Issued", "Refresh", "Version", "Trial", "LicenseType",
|
||||
"Hash", "Signature", "SignatureBytes", "InstallationId", "Expires",
|
||||
"ExpirationWithoutGracePeriod", "Token", "LimitCollectionCreationDeletion",
|
||||
"LimitCollectionCreation", "LimitCollectionDeletion", "AllowAdminAccessToAllCollectionItems",
|
||||
"UseOrganizationDomains", "UseAdminSponsoredFamilies", "UseAutomaticUserConfirmation", "UsePhishingBlocker", "UseDisableSmAdsForUsers") &&
|
||||
"LimitCollectionCreation", "LimitCollectionDeletion", "AllowAdminAccessToAllCollectionItems") &&
|
||||
// Same property but different name, use explicit mapping
|
||||
org.ExpirationDate == license.Expires));
|
||||
}
|
||||
@@ -169,7 +168,8 @@ public class UpdateOrganizationLicenseCommandTests
|
||||
new(OrganizationLicenseConstants.ExpirationWithoutGracePeriod, DateTime.Now.AddMonths(12).ToString("O")),
|
||||
new(OrganizationLicenseConstants.Trial, "false"),
|
||||
new(OrganizationLicenseConstants.LimitCollectionCreationDeletion, "true"),
|
||||
new(OrganizationLicenseConstants.AllowAdminAccessToAllCollectionItems, "true")
|
||||
new(OrganizationLicenseConstants.AllowAdminAccessToAllCollectionItems, "true"),
|
||||
new(OrganizationLicenseConstants.UseMyItems, "true")
|
||||
};
|
||||
var claimsPrincipal = new ClaimsPrincipal(new ClaimsIdentity(claims));
|
||||
|
||||
@@ -236,7 +236,8 @@ public class UpdateOrganizationLicenseCommandTests
|
||||
org.UseAdminSponsoredFamilies == true &&
|
||||
org.UseAutomaticUserConfirmation == true &&
|
||||
org.UseDisableSmAdsForUsers == true &&
|
||||
org.UsePhishingBlocker == true));
|
||||
org.UsePhishingBlocker == true &&
|
||||
org.UseMyItems));
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user