1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-20 02:54:32 -05:00

[Reset Password] Admin page updates (#1379)

This commit is contained in:
Vincent Salucci 2021-06-07 09:08:34 -05:00 committed by GitHub
parent fe1ffb6a22
commit f6236bea6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 13 additions and 0 deletions

View File

@ -37,6 +37,7 @@ namespace Bit.Admin.Models
UseTotp = org.UseTotp; UseTotp = org.UseTotp;
Use2fa = org.Use2fa; Use2fa = org.Use2fa;
UseApi = org.UseApi; UseApi = org.UseApi;
UseResetPassword = org.UseResetPassword;
SelfHost = org.SelfHost; SelfHost = org.SelfHost;
UsersGetPremium = org.UsersGetPremium; UsersGetPremium = org.UsersGetPremium;
MaxStorageGb = org.MaxStorageGb; MaxStorageGb = org.MaxStorageGb;
@ -86,6 +87,8 @@ namespace Bit.Admin.Models
public bool Use2fa { get; set; } public bool Use2fa { get; set; }
[Display(Name = "API")] [Display(Name = "API")]
public bool UseApi{ get; set; } public bool UseApi{ get; set; }
[Display(Name = "Reset Password")]
public bool UseResetPassword { get; set; }
[Display(Name = "Self Host")] [Display(Name = "Self Host")]
public bool SelfHost { get; set; } public bool SelfHost { get; set; }
[Display(Name = "Users Get Premium")] [Display(Name = "Users Get Premium")]
@ -122,6 +125,7 @@ namespace Bit.Admin.Models
existingOrganization.UseTotp = UseTotp; existingOrganization.UseTotp = UseTotp;
existingOrganization.Use2fa = Use2fa; existingOrganization.Use2fa = Use2fa;
existingOrganization.UseApi = UseApi; existingOrganization.UseApi = UseApi;
existingOrganization.UseResetPassword = UseResetPassword;
existingOrganization.SelfHost = SelfHost; existingOrganization.SelfHost = SelfHost;
existingOrganization.UsersGetPremium = UsersGetPremium; existingOrganization.UsersGetPremium = UsersGetPremium;
existingOrganization.MaxStorageGb = MaxStorageGb; existingOrganization.MaxStorageGb = MaxStorageGb;

View File

@ -16,6 +16,7 @@ namespace Bit.Admin.Models
IEnumerable<Policy> policies) IEnumerable<Policy> policies)
{ {
Organization = org; Organization = org;
HasPublicPrivateKeys = org.PublicKey != null && org.PrivateKey != null;
UserCount = orgUsers.Count(); UserCount = orgUsers.Count();
CipherCount = ciphers.Count(); CipherCount = ciphers.Count();
CollectionCount = collections.Count(); CollectionCount = collections.Count();
@ -39,5 +40,6 @@ namespace Bit.Admin.Models
public int CollectionCount { get; set; } public int CollectionCount { get; set; }
public int GroupCount { get; set; } public int GroupCount { get; set; }
public int PolicyCount { get; set; } public int PolicyCount { get; set; }
public bool HasPublicPrivateKeys { get; set; }
} }
} }

View File

@ -178,6 +178,10 @@
<input type="checkbox" class="form-check-input" asp-for="UseEvents"> <input type="checkbox" class="form-check-input" asp-for="UseEvents">
<label class="form-check-label" asp-for="UseEvents"></label> <label class="form-check-label" asp-for="UseEvents"></label>
</div> </div>
<div class="form-check">
<input type="checkbox" class="form-check-input" asp-for="UseResetPassword">
<label class="form-check-label" asp-for="UseResetPassword"></label>
</div>
<div class="form-check mb-3"> <div class="form-check mb-3">
<input type="checkbox" class="form-check-input" asp-for="UsersGetPremium"> <input type="checkbox" class="form-check-input" asp-for="UsersGetPremium">
<label class="form-check-label" asp-for="UsersGetPremium"></label> <label class="form-check-label" asp-for="UsersGetPremium"></label>

View File

@ -32,6 +32,9 @@
<dt class="col-sm-4 col-lg-3">Policies</dt> <dt class="col-sm-4 col-lg-3">Policies</dt>
<dd class="col-sm-8 col-lg-9">@Model.PolicyCount</dd> <dd class="col-sm-8 col-lg-9">@Model.PolicyCount</dd>
<dt class="col-sm-4 col-lg-3">Public/Private Keys</dt>
<dd class="col-sm-8 col-lg-9">@(Model.HasPublicPrivateKeys ? "Yes" : "No")</dd>
<dt class="col-sm-4 col-lg-3">Created</dt> <dt class="col-sm-4 col-lg-3">Created</dt>
<dd class="col-sm-8 col-lg-9">@Model.Organization.CreationDate.ToString()</dd> <dd class="col-sm-8 col-lg-9">@Model.Organization.CreationDate.ToString()</dd>