1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-30 07:36:14 -05:00

[AC-2699] Remove AccessAll from api request/response models (#4203)

This commit is contained in:
Thomas Rittson
2024-06-21 09:00:01 +10:00
committed by GitHub
parent 01d67dce48
commit 6262686c0c
5 changed files with 6 additions and 29 deletions

View File

@ -9,7 +9,6 @@ public class GroupRequestModel
[Required]
[StringLength(100)]
public string Name { get; set; }
public bool? AccessAll { get; set; }
public IEnumerable<SelectionReadOnlyRequestModel> Collections { get; set; }
public IEnumerable<Guid> Users { get; set; }
@ -24,7 +23,6 @@ public class GroupRequestModel
public Group ToGroup(Group existingGroup)
{
existingGroup.Name = Name;
existingGroup.AccessAll = AccessAll ?? false;
return existingGroup;
}
}

View File

@ -15,7 +15,6 @@ public class OrganizationUserInviteRequestModel
public IEnumerable<string> Emails { get; set; }
[Required]
public OrganizationUserType? Type { get; set; }
public bool AccessAll { get; set; }
public bool AccessSecretsManager { get; set; }
public Permissions Permissions { get; set; }
public IEnumerable<SelectionReadOnlyRequestModel> Collections { get; set; }
@ -27,7 +26,6 @@ public class OrganizationUserInviteRequestModel
{
Emails = Emails,
Type = Type,
AccessAll = AccessAll,
AccessSecretsManager = AccessSecretsManager,
Collections = Collections?.Select(c => c.ToSelectionReadOnly()),
Groups = Groups,
@ -86,7 +84,6 @@ public class OrganizationUserUpdateRequestModel
{
[Required]
public OrganizationUserType? Type { get; set; }
public bool AccessAll { get; set; }
public bool AccessSecretsManager { get; set; }
public Permissions Permissions { get; set; }
public IEnumerable<SelectionReadOnlyRequestModel> Collections { get; set; }
@ -96,7 +93,6 @@ public class OrganizationUserUpdateRequestModel
{
existingUser.Type = Type.Value;
existingUser.Permissions = CoreHelpers.ClassToJsonData(Permissions);
existingUser.AccessAll = AccessAll;
existingUser.AccessSecretsManager = AccessSecretsManager;
return existingUser;
}

View File

@ -18,14 +18,12 @@ public class GroupResponseModel : ResponseModel
Id = group.Id;
OrganizationId = group.OrganizationId;
Name = group.Name;
AccessAll = group.AccessAll;
ExternalId = group.ExternalId;
}
public Guid Id { get; set; }
public Guid OrganizationId { get; set; }
public string Name { get; set; }
public bool AccessAll { get; set; }
public string ExternalId { get; set; }
}

View File

@ -23,7 +23,6 @@ public class OrganizationUserResponseModel : ResponseModel
UserId = organizationUser.UserId;
Type = organizationUser.Type;
Status = organizationUser.Status;
AccessAll = organizationUser.AccessAll;
ExternalId = organizationUser.ExternalId;
AccessSecretsManager = organizationUser.AccessSecretsManager;
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(organizationUser.Permissions);
@ -42,7 +41,6 @@ public class OrganizationUserResponseModel : ResponseModel
UserId = organizationUser.UserId;
Type = organizationUser.Type;
Status = organizationUser.Status;
AccessAll = organizationUser.AccessAll;
ExternalId = organizationUser.ExternalId;
AccessSecretsManager = organizationUser.AccessSecretsManager;
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(organizationUser.Permissions);
@ -55,7 +53,6 @@ public class OrganizationUserResponseModel : ResponseModel
public Guid? UserId { get; set; }
public OrganizationUserType Type { get; set; }
public OrganizationUserStatusType Status { get; set; }
public bool AccessAll { get; set; }
public string ExternalId { get; set; }
public bool AccessSecretsManager { get; set; }
public Permissions Permissions { get; set; }