1
0
mirror of https://github.com/bitwarden/server synced 2026-01-04 09:33:40 +00:00

[AC-1646] Rename LimitCollectionCdOwnerAdmin column (#3300)

* Rename LimitCollectionCdOwnerAdmin -> LimitCollectionCreationDeletion

* Rename and bump migration script
This commit is contained in:
Thomas Rittson
2023-09-27 07:37:34 +10:00
committed by GitHub
parent 5d431adbd4
commit a3f554a34e
25 changed files with 52 additions and 52 deletions

View File

@@ -356,7 +356,7 @@ public class CurrentContext : ICurrentContext
var org = GetOrganization(orgId);
if (org != null)
{
canCreateNewCollections = !org.LimitCollectionCdOwnerAdmin || org.Permissions.CreateNewCollections;
canCreateNewCollections = !org.LimitCollectionCreationDeletion || org.Permissions.CreateNewCollections;
}
return await EditAssignedCollections(orgId)
|| await DeleteAssignedCollections(orgId)

View File

@@ -15,12 +15,12 @@ public class CurrentContextOrganization
Type = orgUser.Type;
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(orgUser.Permissions);
AccessSecretsManager = orgUser.AccessSecretsManager && orgUser.UseSecretsManager;
LimitCollectionCdOwnerAdmin = orgUser.LimitCollectionCdOwnerAdmin;
LimitCollectionCreationDeletion = orgUser.LimitCollectionCreationDeletion;
}
public Guid Id { get; set; }
public OrganizationUserType Type { get; set; }
public Permissions Permissions { get; set; } = new();
public bool AccessSecretsManager { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
}

View File

@@ -81,7 +81,7 @@ public class Organization : ITableObject<Guid>, ISubscriber, IStorable, IStorabl
/// <summary>
/// Refers to the ability for an organization to limit collection creation and deletion to owners and admins only
/// </summary>
public bool LimitCollectionCdOwnerAdmin { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
public void SetNewId()
{

View File

@@ -48,5 +48,5 @@ public class OrganizationUserOrganizationDetails
public bool UsePasswordManager { get; set; }
public int? SmSeats { get; set; }
public int? SmServiceAccounts { get; set; }
public bool LimitCollectionCdOwnerAdmin { get; set; }
public bool LimitCollectionCreationDeletion { get; set; }
}

View File

@@ -142,7 +142,7 @@ public class SelfHostedOrganizationDetails : Organization
RevisionDate = RevisionDate,
MaxAutoscaleSeats = MaxAutoscaleSeats,
OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling,
LimitCollectionCdOwnerAdmin = LimitCollectionCdOwnerAdmin,
LimitCollectionCreationDeletion = LimitCollectionCreationDeletion,
};
}
}