mirror of
https://github.com/bitwarden/server.git
synced 2024-11-21 12:05:42 +01:00
Remove hints from responses (#4635)
This commit is contained in:
parent
8ab19c7b00
commit
aa66b5ad11
@ -8,13 +8,12 @@ public class UpdateProfileRequestModel
|
||||
[StringLength(50)]
|
||||
public string Name { get; set; }
|
||||
[StringLength(50)]
|
||||
[Obsolete("Changes will be made via the 'password' endpoint going forward.")]
|
||||
[Obsolete("This field is ignored. Changes are made via the 'password' endpoint.")]
|
||||
public string MasterPasswordHint { get; set; }
|
||||
|
||||
public User ToUser(User existingUser)
|
||||
{
|
||||
existingUser.Name = Name;
|
||||
existingUser.MasterPasswordHint = string.IsNullOrWhiteSpace(MasterPasswordHint) ? null : MasterPasswordHint;
|
||||
return existingUser;
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,6 @@ public class ProfileResponseModel : ResponseModel
|
||||
EmailVerified = user.EmailVerified;
|
||||
Premium = user.Premium;
|
||||
PremiumFromOrganization = premiumFromOrganization;
|
||||
MasterPasswordHint = string.IsNullOrWhiteSpace(user.MasterPasswordHint) ? null : user.MasterPasswordHint;
|
||||
Culture = user.Culture;
|
||||
TwoFactorEnabled = twoFactorEnabled;
|
||||
Key = user.Key;
|
||||
@ -53,7 +52,6 @@ public class ProfileResponseModel : ResponseModel
|
||||
public bool EmailVerified { get; set; }
|
||||
public bool Premium { get; set; }
|
||||
public bool PremiumFromOrganization { get; set; }
|
||||
public string MasterPasswordHint { get; set; }
|
||||
public string Culture { get; set; }
|
||||
public bool TwoFactorEnabled { get; set; }
|
||||
public string Key { get; set; }
|
||||
|
@ -30,7 +30,6 @@ public class AccountsControllerTest : IClassFixture<ApiApplicationFactory>
|
||||
Assert.False(content.EmailVerified);
|
||||
Assert.False(content.Premium);
|
||||
Assert.False(content.PremiumFromOrganization);
|
||||
Assert.Null(content.MasterPasswordHint);
|
||||
Assert.Equal("en-US", content.Culture);
|
||||
Assert.Null(content.Key);
|
||||
Assert.Null(content.PrivateKey);
|
||||
|
Loading…
Reference in New Issue
Block a user