Fixed the issue when enabling the Hide Request Users included system users e.g. API key user #2232

pull/2258/head
Jamie Rees 7 years ago
parent 48faf65d4b
commit 2b227e7201

@ -110,7 +110,7 @@ namespace Ombi.Core.Engine
protected async Task<HideResult> HideFromOtherUsers()
{
var user = await GetUser();
if (await IsInRole(OmbiRoles.Admin) || await IsInRole(OmbiRoles.PowerUser))
if (await IsInRole(OmbiRoles.Admin) || await IsInRole(OmbiRoles.PowerUser) || user.IsSystemUser)
{
return new HideResult
{

@ -36,6 +36,8 @@ namespace Ombi.Store.Entities
[NotMapped]
public bool EmailLogin { get; set; }
[NotMapped] public bool IsSystemUser => UserType == UserType.SystemUser;
[JsonIgnore]
public override string PasswordHash

Loading…
Cancel
Save