Skip to content

Commit

Permalink
Fixed #832
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamie.Rees authored and Jamie.Rees committed Dec 29, 2016
1 parent 841c9cd commit b3c7d83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 20 deletions.
3 changes: 3 additions & 0 deletions Ombi.Services/Jobs/PlexUserChecker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,9 @@ public void Execute(IJobExecutionContext context)
// Main Plex user
var dbMainAcc = dbUsers.FirstOrDefault(x => x.Username.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture));
var localMainAcc = localUsers.FirstOrDefault(x => x.UserName.Equals(mainPlexAccount.Username, StringComparison.CurrentCulture));

// TODO if admin acc does exist, check if we need to update it


// Create the local admin account if it doesn't already exist
if (dbMainAcc == null && localMainAcc == null)
Expand Down
2 changes: 1 addition & 1 deletion Ombi.UI/Modules/Admin/AdminModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ private async Task<Response> TestPushoverNotifications()
NotificationType = NotificationType.Test,
DateTime = DateTime.Now
};
var currentSettings = await PushbulletService.GetSettingsAsync();
var currentSettings = await PushoverService.GetSettingsAsync();
try
{
NotificationService.Subscribe(new PushoverNotification(PushoverApi, PushoverService));
Expand Down
17 changes: 3 additions & 14 deletions Ombi.UI/Views/Admin/PushoverNotifications.cshtml
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
@using Ombi.UI.Helpers
@inherits Nancy.ViewEngines.Razor.NancyRazorViewBase<Ombi.Core.SettingModels.PushoverNotificationSettings>
@Html.Partial("Shared/Partial/_Sidebar")

<div class="col-sm-8 col-sm-push-1">
<form class="form-horizontal" method="POST" id="mainForm">
<fieldset>
<legend>Pushover Notifications</legend>


<div class="form-group">
<div class="checkbox">

@if (Model.Enabled)
{
<input type="checkbox" id="Enabled" name="Enabled" checked="checked"><label for="Enabled">Enabled</label>
}
else
{
<input type="checkbox" id="Enabled" name="Enabled"><label for="Enabled">Enabled</label>
}

</div>
</div>
@Html.Checkbox(Model.Enabled, "Enabled", "Enabled")

<div class="form-group">
<label for="AccessToken" class="control-label">API Key</label>
Expand Down
6 changes: 1 addition & 5 deletions Ombi.UI/Views/Shared/Partial/_Navbar.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
<li id="customDonate" style="display: none"><a id="customDonateHref" href="https://www.paypal.me/PlexRequestsNet" target="_blank"><i class="fa fa-heart" style="color: yellow;"></i> <span id="donationText">@UI.Custom_Donation_Default</span></a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
@if (!Html.IsLoggedIn(Context))
{
<li><a href="@url/login?redirect=@Context.Request.Path"><i class="fa fa-user"></i> @UI.Layout_Admin</a></li>
}
@if (Html.IsAdmin())
{
<li><a>@UI.Layout_Welcome @Context.CurrentUser.UserName</a></li>
Expand Down Expand Up @@ -91,7 +87,7 @@
</li>

}
else if (Html.IsLoggedIn(Context)) // Logged in but not admin
else if (Html.IsLoggedIn(Context)) // Logged in but not admin but not a real user
{
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-user"></i> @UI.Layout_Welcome @Context.Request.Session[SessionKeys.UsernameKey] <span class="caret"></span></a>
Expand Down

0 comments on commit b3c7d83

Please sign in to comment.