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:
@@ -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)
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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; }
|
||||
}
|
||||
|
||||
@@ -142,7 +142,7 @@ public class SelfHostedOrganizationDetails : Organization
|
||||
RevisionDate = RevisionDate,
|
||||
MaxAutoscaleSeats = MaxAutoscaleSeats,
|
||||
OwnersNotifiedOfAutoscaling = OwnersNotifiedOfAutoscaling,
|
||||
LimitCollectionCdOwnerAdmin = LimitCollectionCdOwnerAdmin,
|
||||
LimitCollectionCreationDeletion = LimitCollectionCreationDeletion,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user