mirror of
https://github.com/bitwarden/server.git
synced 2025-07-02 08:32:50 -05:00
[SG-783] Change organization user list to pull the user's selected color and display it in the avatar (#2630)
* work: baseline for org stuff * fix: missed view as usual oops * fix: refresh using sp_refreshsqlmodule
This commit is contained in:
@ -89,6 +89,7 @@ public class OrganizationUserUserDetailsResponseModel : OrganizationUserResponse
|
||||
|
||||
Name = organizationUser.Name;
|
||||
Email = organizationUser.Email;
|
||||
AvatarColor = organizationUser.AvatarColor;
|
||||
TwoFactorEnabled = twoFactorEnabled;
|
||||
SsoBound = !string.IsNullOrWhiteSpace(organizationUser.SsoExternalId);
|
||||
Collections = organizationUser.Collections.Select(c => new SelectionReadOnlyResponseModel(c));
|
||||
@ -97,8 +98,10 @@ public class OrganizationUserUserDetailsResponseModel : OrganizationUserResponse
|
||||
ResetPasswordEnrolled = ResetPasswordEnrolled && !organizationUser.UsesKeyConnector;
|
||||
}
|
||||
|
||||
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string AvatarColor { get; set; }
|
||||
public bool TwoFactorEnabled { get; set; }
|
||||
public bool SsoBound { get; set; }
|
||||
public IEnumerable<SelectionReadOnlyResponseModel> Collections { get; set; }
|
||||
|
@ -12,6 +12,7 @@ public class OrganizationUserUserDetails : IExternal, ITwoFactorProvidersUser
|
||||
public Guid? UserId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public string AvatarColor { get; set; }
|
||||
public string TwoFactorProviders { get; set; }
|
||||
public bool? Premium { get; set; }
|
||||
public OrganizationUserStatusType Status { get; set; }
|
||||
|
@ -19,6 +19,7 @@ public class OrganizationUserUserDetailsViewQuery : IQuery<OrganizationUserUserD
|
||||
OrganizationId = x.ou.OrganizationId,
|
||||
Name = x.u.Name,
|
||||
Email = x.u.Email ?? x.ou.Email,
|
||||
AvatarColor = x.u.AvatarColor,
|
||||
TwoFactorProviders = x.u.TwoFactorProviders,
|
||||
Premium = x.u.Premium,
|
||||
Status = x.ou.Status,
|
||||
|
@ -6,6 +6,7 @@ SELECT
|
||||
OU.[OrganizationId],
|
||||
U.[Name],
|
||||
ISNULL(U.[Email], OU.[Email]) Email,
|
||||
U.[AvatarColor],
|
||||
U.[TwoFactorProviders],
|
||||
U.[Premium],
|
||||
OU.[Status],
|
||||
|
Reference in New Issue
Block a user