mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 15:42:48 -05:00
[AC-2286] Include the OrganizationUserId for each Organization in the user sync data (#4142)
* [AC-2286] Include the OrganizationUserId for each Organization in the user sync data * Make OrganizationUserId property non-nullable
This commit is contained in:
@ -48,6 +48,7 @@ public class ProfileOrganizationResponseModel : ResponseModel
|
||||
Permissions = CoreHelpers.LoadClassFromJsonData<Permissions>(organization.Permissions);
|
||||
ResetPasswordEnrolled = organization.ResetPasswordKey != null;
|
||||
UserId = organization.UserId;
|
||||
OrganizationUserId = organization.OrganizationUserId;
|
||||
ProviderId = organization.ProviderId;
|
||||
ProviderName = organization.ProviderName;
|
||||
ProviderType = organization.ProviderType;
|
||||
@ -138,6 +139,7 @@ public class ProfileOrganizationResponseModel : ResponseModel
|
||||
public Permissions Permissions { get; set; }
|
||||
public bool ResetPasswordEnrolled { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public Guid OrganizationUserId { get; set; }
|
||||
public bool HasPublicAndPrivateKeys { get; set; }
|
||||
public Guid? ProviderId { get; set; }
|
||||
[JsonConverter(typeof(HtmlEncodingStringConverter))]
|
||||
|
@ -8,6 +8,7 @@ public class OrganizationUserOrganizationDetails
|
||||
{
|
||||
public Guid OrganizationId { get; set; }
|
||||
public Guid? UserId { get; set; }
|
||||
public Guid OrganizationUserId { get; set; }
|
||||
[JsonConverter(typeof(HtmlEncodingStringConverter))]
|
||||
public string Name { get; set; }
|
||||
public bool UsePolicies { get; set; }
|
||||
|
@ -23,6 +23,7 @@ public class OrganizationUserOrganizationDetailsViewQuery : IQuery<OrganizationU
|
||||
{
|
||||
UserId = ou.UserId,
|
||||
OrganizationId = ou.OrganizationId,
|
||||
OrganizationUserId = ou.Id,
|
||||
Name = o.Name,
|
||||
Enabled = o.Enabled,
|
||||
PlanType = o.PlanType,
|
||||
|
@ -3,6 +3,7 @@ AS
|
||||
SELECT
|
||||
OU.[UserId],
|
||||
OU.[OrganizationId],
|
||||
OU.[Id] OrganizationUserId,
|
||||
O.[Name],
|
||||
O.[Enabled],
|
||||
O.[PlanType],
|
||||
|
Reference in New Issue
Block a user