mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 14:35:24 -07:00
Send new request to power users as convention
Remove option to toggle it off
This commit is contained in:
parent
8d35a3dd7b
commit
02714dccf7
5 changed files with 1 additions and 11 deletions
|
@ -116,10 +116,7 @@ namespace Ombi.Notifications.Agents
|
||||||
message.Other.Add("PlainTextBody", plaintext);
|
message.Other.Add("PlainTextBody", plaintext);
|
||||||
|
|
||||||
IEnumerable<OmbiUser> recipients = await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin);
|
IEnumerable<OmbiUser> recipients = await _userManager.GetUsersInRoleAsync(OmbiRoles.Admin);
|
||||||
if (settings.SendNewRequestToPowerUsers)
|
recipients = recipients.Concat(await _userManager.GetUsersInRoleAsync(OmbiRoles.PowerUser));
|
||||||
{
|
|
||||||
recipients = recipients.Concat(await _userManager.GetUsersInRoleAsync(OmbiRoles.PowerUser));
|
|
||||||
}
|
|
||||||
foreach (var recipient in recipients.DistinctBy(x => x.Email))
|
foreach (var recipient in recipients.DistinctBy(x => x.Email))
|
||||||
{
|
{
|
||||||
if (recipient.Email.IsNullOrEmpty())
|
if (recipient.Email.IsNullOrEmpty())
|
||||||
|
|
|
@ -13,6 +13,5 @@
|
||||||
public string AdminEmail { get; set; }
|
public string AdminEmail { get; set; }
|
||||||
public bool DisableTLS { get; set; }
|
public bool DisableTLS { get; set; }
|
||||||
public bool DisableCertificateChecking { get; set; }
|
public bool DisableCertificateChecking { get; set; }
|
||||||
public bool SendNewRequestToPowerUsers{ get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,7 +15,6 @@ export interface IEmailNotificationSettings extends INotificationSettings {
|
||||||
adminEmail: string;
|
adminEmail: string;
|
||||||
disableTLS: boolean;
|
disableTLS: boolean;
|
||||||
disableCertificateChecking: boolean;
|
disableCertificateChecking: boolean;
|
||||||
sendNewRequestToPowerUsers: boolean;
|
|
||||||
notificationTemplates: INotificationTemplates[];
|
notificationTemplates: INotificationTemplates[];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,10 +21,6 @@
|
||||||
<mat-slide-toggle formControlName="disableCertificateChecking">Disable Certificate
|
<mat-slide-toggle formControlName="disableCertificateChecking">Disable Certificate
|
||||||
Checking</mat-slide-toggle>
|
Checking</mat-slide-toggle>
|
||||||
</div>
|
</div>
|
||||||
<div class="md-form-field">
|
|
||||||
<mat-slide-toggle formControlName="sendNewRequestToPowerUsers">Send New Request
|
|
||||||
To Power Users</mat-slide-toggle>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,6 @@ export class EmailNotificationComponent implements OnInit {
|
||||||
adminEmail: [x.adminEmail, [Validators.required, Validators.email]],
|
adminEmail: [x.adminEmail, [Validators.required, Validators.email]],
|
||||||
disableTLS: [x.disableTLS],
|
disableTLS: [x.disableTLS],
|
||||||
disableCertificateChecking: [x.disableCertificateChecking],
|
disableCertificateChecking: [x.disableCertificateChecking],
|
||||||
sendNewRequestToPowerUsers: [x.sendNewRequestToPowerUsers],
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (x.authentication) {
|
if (x.authentication) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue