diff --git a/PlexRequests.Core.Migration/Migrations/Version1100.cs b/PlexRequests.Core.Migration/Migrations/Version1100.cs index 15c127d6e..7e23cbdbe 100644 --- a/PlexRequests.Core.Migration/Migrations/Version1100.cs +++ b/PlexRequests.Core.Migration/Migrations/Version1100.cs @@ -238,9 +238,13 @@ namespace PlexRequests.Core.Migration.Migrations // UI = https://image.tmdb.org/t/p/w150/{{posterPath}} // Update old invalid posters - var allRequests = RequestService.GetAll().ToList(); - - foreach (var req in allRequests) + var allRequests = RequestService.GetAll(); + if (allRequests == null) + { + return; + } + var requestedModels = allRequests as RequestedModel[] ?? allRequests.ToArray(); + foreach (var req in requestedModels) { if (req.PosterPath.Contains("https://image.tmdb.org/t/p/w150/")) { @@ -248,7 +252,7 @@ namespace PlexRequests.Core.Migration.Migrations req.PosterPath = newImg; } } - RequestService.BatchUpdate(allRequests); + RequestService.BatchUpdate(requestedModels); } private void UpdateAdmin() diff --git a/PlexRequests.Core/StatusChecker/StatusChecker.cs b/PlexRequests.Core/StatusChecker/StatusChecker.cs index 088f881ff..94e33b6b6 100644 --- a/PlexRequests.Core/StatusChecker/StatusChecker.cs +++ b/PlexRequests.Core/StatusChecker/StatusChecker.cs @@ -146,8 +146,17 @@ namespace PlexRequests.Core.StatusChecker eapAtrifactRequest.AddHeader("Authorization", $"Bearer {api}"); eapAtrifactRequest.AddHeader("Content-Type", "application/json"); - var artifactResult = request.ExecuteJson>(eapAtrifactRequest, new Uri(AppveyorApiUrl)).FirstOrDefault(); + var artifactResults = request.ExecuteJson>(eapAtrifactRequest, new Uri(AppveyorApiUrl)); + var artifactResult = artifactResults.FirstOrDefault(); + + if (artifactResult == null) + { + return new StatusModel + { + UpdateAvailable = false + }; + } var downloadLink = $"{AppveyorApiUrl}/buildjobs/{jobId}/artifacts/{artifactResult.fileName}"; var branchDisplay = EnumHelper.GetDisplayValue(branch); diff --git a/PlexRequests.Helpers/Analytics/Analytics.cs b/PlexRequests.Helpers/Analytics/Analytics.cs index b38daca12..ed7eed4fd 100644 --- a/PlexRequests.Helpers/Analytics/Analytics.cs +++ b/PlexRequests.Helpers/Analytics/Analytics.cs @@ -167,6 +167,8 @@ namespace PlexRequests.Helpers.Analytics } #endif } + +#pragma warning disable CS1998 // Async method lacks 'await' operators and will run synchronously private async Task SendRequestAsync(string postDataString) { var request = (HttpWebRequest)WebRequest.Create(AnalyticsUri); @@ -195,6 +197,7 @@ namespace PlexRequests.Helpers.Analytics } #endif } +#pragma warning restore CS1998 // Async method lacks 'await' operators and will run synchronously private Dictionary BuildRequestData(HitType type, string username, string category, string action, string clientId, string label, int? value, string exceptionDescription, int? fatal) { diff --git a/PlexRequests.Helpers/Permissions/Permissions.cs b/PlexRequests.Helpers/Permissions/Permissions.cs index 74b20992e..57112ee7e 100644 --- a/PlexRequests.Helpers/Permissions/Permissions.cs +++ b/PlexRequests.Helpers/Permissions/Permissions.cs @@ -70,6 +70,9 @@ namespace PlexRequests.Helpers.Permissions UsersCanViewOnlyOwnRequests = 1024, [Display(Name = "Users can only view their own issues")] - UsersCanViewOnlyOwnIssues = 2048 + UsersCanViewOnlyOwnIssues = 2048, + + [Display(Name = "Bypass the request limit")] + BypassRequestLimit = 4096 } } \ No newline at end of file diff --git a/PlexRequests.Services/Jobs/RecentlyAdded.cs b/PlexRequests.Services/Jobs/RecentlyAdded.cs index 7706da615..bc4c2c308 100644 --- a/PlexRequests.Services/Jobs/RecentlyAdded.cs +++ b/PlexRequests.Services/Jobs/RecentlyAdded.cs @@ -105,6 +105,7 @@ namespace PlexRequests.Services.Jobs public void Test() { + Log.Debug("Starting Test Newsletter"); var settings = NewsletterSettings.GetSettings(); Start(settings, true); } @@ -113,19 +114,32 @@ namespace PlexRequests.Services.Jobs { var sb = new StringBuilder(); var plexSettings = PlexSettings.GetSettings(); + Log.Debug("Got Plex Settings"); var libs = Api.GetLibrarySections(plexSettings.PlexAuthToken, plexSettings.FullUri); + Log.Debug("Getting Plex Library Sections"); + var tvSection = libs.Directories.FirstOrDefault(x => x.type.Equals(PlexMediaType.Show.ToString(), StringComparison.CurrentCultureIgnoreCase)); + Log.Debug("Filtered sections for TV"); var movieSection = libs.Directories.FirstOrDefault(x => x.type.Equals(PlexMediaType.Movie.ToString(), StringComparison.CurrentCultureIgnoreCase)); - + Log.Debug("Filtered sections for Movies"); + + var recentlyAddedTv = Api.RecentlyAdded(plexSettings.PlexAuthToken, plexSettings.FullUri, tvSection.Key); + Log.Debug("Got RecentlyAdded TV Shows"); var recentlyAddedMovies = Api.RecentlyAdded(plexSettings.PlexAuthToken, plexSettings.FullUri, movieSection.Key); + Log.Debug("Got RecentlyAdded Movies"); + Log.Debug("Started Generating Movie HTML"); GenerateMovieHtml(recentlyAddedMovies, plexSettings, sb); + Log.Debug("Finished Generating Movie HTML"); + Log.Debug("Started Generating TV HTML"); GenerateTvHtml(recentlyAddedTv, plexSettings, sb); + Log.Debug("Finished Generating TV HTML"); var template = new RecentlyAddedTemplate(); var html = template.LoadTemplate(sb.ToString()); + Log.Debug("Loaded the template"); Send(newletterSettings, html, plexSettings, testEmail); } @@ -188,11 +202,17 @@ namespace PlexRequests.Services.Jobs private void GenerateTvHtml(RecentlyAddedModel tv, PlexSettings plexSettings, StringBuilder sb) { + var orderedTv = tv?._children; + if (orderedTv == null) + { + return; + } + orderedTv = orderedTv.OrderByDescending(x => x?.addedAt.UnixTimeStampToDateTime()).ToList(); // TV sb.Append("

New Episodes:



"); sb.Append( ""); - foreach (var t in tv._children.OrderByDescending(x => x.addedAt.UnixTimeStampToDateTime())) + foreach (var t in orderedTv) { var plexGUID = string.Empty; try @@ -247,6 +267,7 @@ namespace PlexRequests.Services.Jobs private void Send(NewletterSettings newletterSettings, string html, PlexSettings plexSettings, bool testEmail = false) { + Log.Debug("Entering Send"); var settings = EmailSettings.GetSettings(); if (!settings.Enabled || string.IsNullOrEmpty(settings.EmailHost)) @@ -255,11 +276,13 @@ namespace PlexRequests.Services.Jobs } var body = new BodyBuilder { HtmlBody = html, TextBody = "This email is only available on devices that support HTML." }; + var message = new MimeMessage { Body = body.ToMessageBody(), Subject = "New Content on Plex!", }; + Log.Debug("Created Plain/HTML MIME body"); if (!testEmail) { @@ -284,6 +307,7 @@ namespace PlexRequests.Services.Jobs } } } + message.Bcc.Add(new MailboxAddress(settings.EmailUsername, settings.RecipientEmail)); // Include the admin message.From.Add(new MailboxAddress(settings.EmailUsername, settings.EmailSender)); @@ -302,7 +326,9 @@ namespace PlexRequests.Services.Jobs client.Authenticate(settings.EmailUsername, settings.EmailPassword); } Log.Info("sending message to {0} \r\n from: {1}\r\n Are we authenticated: {2}", message.To, message.From, client.IsAuthenticated); + Log.Debug("Sending"); client.Send(message); + Log.Debug("Sent"); client.Disconnect(true); } } diff --git a/PlexRequests.Store/Repository/PlexUserRepository.cs b/PlexRequests.Store/Repository/PlexUserRepository.cs index 177dab2b5..b706ff201 100644 --- a/PlexRequests.Store/Repository/PlexUserRepository.cs +++ b/PlexRequests.Store/Repository/PlexUserRepository.cs @@ -41,11 +41,9 @@ namespace PlexRequests.Store.Repository public PlexUserRepository(ISqliteConfiguration config, ICacheProvider cache) : base(config,cache) { DbConfig = config; - Cache = cache; } private ISqliteConfiguration DbConfig { get; } - private ICacheProvider Cache { get; } private IDbConnection Db => DbConfig.DbConnection(); public PlexUsers GetUser(string userGuid) @@ -69,7 +67,9 @@ namespace PlexRequests.Store.Repository return await Db.QueryFirstOrDefaultAsync(sql, new {UserGuid = userguid}); } - #region abstract implimentation + #region abstract implementation + +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member [Obsolete] public override PlexUsers Get(string id) { @@ -94,6 +94,7 @@ namespace PlexRequests.Store.Repository throw new System.NotImplementedException(); } +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member #endregion } diff --git a/PlexRequests.Store/Repository/UserRepository.cs b/PlexRequests.Store/Repository/UserRepository.cs index d661a30ec..50a513e98 100644 --- a/PlexRequests.Store/Repository/UserRepository.cs +++ b/PlexRequests.Store/Repository/UserRepository.cs @@ -40,11 +40,9 @@ namespace PlexRequests.Store.Repository public UserRepository(ISqliteConfiguration config, ICacheProvider cache) : base(config,cache) { DbConfig = config; - Cache = cache; } private ISqliteConfiguration DbConfig { get; } - private ICacheProvider Cache { get; } private IDbConnection Db => DbConfig.DbConnection(); public UsersModel GetUser(string userGuid) @@ -68,7 +66,9 @@ namespace PlexRequests.Store.Repository return await Db.QueryFirstOrDefaultAsync(sql, new {UserGuid = userguid}); } - #region abstract implimentation + #region abstract implementation + +#pragma warning disable CS0809 // Obsolete member overrides non-obsolete member [Obsolete] public override UsersModel Get(string id) { @@ -93,6 +93,7 @@ namespace PlexRequests.Store.Repository throw new System.NotImplementedException(); } +#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member #endregion } diff --git a/PlexRequests.UI/Modules/Admin/AdminModule.cs b/PlexRequests.UI/Modules/Admin/AdminModule.cs index 80b1ea66c..64ac7794f 100644 --- a/PlexRequests.UI/Modules/Admin/AdminModule.cs +++ b/PlexRequests.UI/Modules/Admin/AdminModule.cs @@ -227,7 +227,7 @@ namespace PlexRequests.UI.Modules Post["/clearlogs", true] = async (x, ct) => await ClearLogs(); Get["/notificationsettings", true] = async (x, ct) => await NotificationSettings(); - Post["/notificationsettings", true] = async (x, ct) => await SaveNotificationSettings(); + Post["/notificationsettings"] = x => SaveNotificationSettings(); Post["/recentlyAddedTest"] = x => RecentlyAddedTest(); } @@ -287,7 +287,7 @@ namespace PlexRequests.UI.Modules { Analytics.TrackEventAsync(Category.Admin, Action.Save, "CollectAnalyticData turned off", Username, CookieHelper.GetAnalyticClientId(Cookies)); } - var result = PrService.SaveSettings(model); + var result = await PrService.SaveSettingsAsync(model); Analytics.TrackEventAsync(Category.Admin, Action.Save, "PlexRequestSettings", Username, CookieHelper.GetAnalyticClientId(Cookies)); return Response.AsJson(result @@ -520,7 +520,7 @@ namespace PlexRequests.UI.Modules { NotificationService.Subscribe(new EmailMessageNotification(EmailService)); settings.Enabled = true; - NotificationService.Publish(notificationModel, settings); + await NotificationService.Publish(notificationModel, settings); Log.Info("Sent email notification test"); } catch (Exception) @@ -620,7 +620,7 @@ namespace PlexRequests.UI.Modules { NotificationService.Subscribe(new PushbulletNotification(PushbulletApi, PushbulletService)); settings.Enabled = true; - NotificationService.Publish(notificationModel, settings); + await NotificationService.Publish(notificationModel, settings); Log.Info("Sent pushbullet notification test"); } catch (Exception) @@ -686,7 +686,7 @@ namespace PlexRequests.UI.Modules { NotificationService.Subscribe(new PushoverNotification(PushoverApi, PushoverService)); settings.Enabled = true; - NotificationService.Publish(notificationModel, settings); + await NotificationService.Publish(notificationModel, settings); Log.Info("Sent pushover notification test"); } catch (Exception) @@ -742,7 +742,10 @@ namespace PlexRequests.UI.Modules private Negotiator Logs() { - return View["Logs"]; + var model = false; + if (Request.Query["developer"] != null) + model = true; + return View["Logs", model]; } private Response LoadLogs() @@ -1040,7 +1043,7 @@ namespace PlexRequests.UI.Modules return View["NotificationSettings", s]; } - private async Task SaveNotificationSettings() + private Negotiator SaveNotificationSettings() { var model = this.Bind(); return View["NotificationSettings", model]; @@ -1050,12 +1053,13 @@ namespace PlexRequests.UI.Modules { try { + Log.Debug("Clicked TEST"); RecentlyAdded.Test(); return Response.AsJson(new JsonResponseModel { Result = true, Message = "Sent email to administrator" }); } catch (Exception e) { - + Log.Error(e); return Response.AsJson(new JsonResponseModel { Result = false, Message = e.Message }); } } diff --git a/PlexRequests.UI/Modules/CultureModule.cs b/PlexRequests.UI/Modules/CultureModule.cs index adf5c2348..75426f613 100644 --- a/PlexRequests.UI/Modules/CultureModule.cs +++ b/PlexRequests.UI/Modules/CultureModule.cs @@ -47,12 +47,12 @@ namespace PlexRequests.UI.Modules { Analytics = a; - Get["/", true] = async(x,c) => await SetCulture(); + Get["/"] = x => SetCulture(); } private IAnalytics Analytics { get; } - public async Task SetCulture() + private RedirectResponse SetCulture() { var culture = (string)Request.Query["l"]; var returnUrl = (string)Request.Query["u"]; diff --git a/PlexRequests.UI/Modules/SearchModule.cs b/PlexRequests.UI/Modules/SearchModule.cs index c5c02111b..2ce0e9469 100644 --- a/PlexRequests.UI/Modules/SearchModule.cs +++ b/PlexRequests.UI/Modules/SearchModule.cs @@ -1234,7 +1234,7 @@ namespace PlexRequests.UI.Modules if (IsAdmin) return true; - if (ShouldAutoApprove(type,s,Username)) + if (Security.HasPermissions(User, Permissions.BypassRequestLimit)) return true; var requestLimit = GetRequestLimitForType(type, s); diff --git a/PlexRequests.UI/Modules/UserLoginModule.cs b/PlexRequests.UI/Modules/UserLoginModule.cs index 38635a1f1..a3c8f65e7 100644 --- a/PlexRequests.UI/Modules/UserLoginModule.cs +++ b/PlexRequests.UI/Modules/UserLoginModule.cs @@ -41,6 +41,7 @@ using PlexRequests.Core.SettingModels; using PlexRequests.Core.Users; using PlexRequests.Helpers; using PlexRequests.Helpers.Analytics; +using PlexRequests.Helpers.Permissions; using PlexRequests.Store; using PlexRequests.Store.Models; using PlexRequests.Store.Repository; @@ -139,6 +140,7 @@ namespace PlexRequests.UI.Modules } var authenticated = false; + var isOwner = false; var settings = await AuthService.GetSettingsAsync(); var plexSettings = await PlexSettings.GetSettingsAsync(); @@ -173,6 +175,7 @@ namespace PlexRequests.UI.Modules { Log.Debug("User is the account owner"); authenticated = true; + isOwner = true; } else { @@ -194,6 +197,7 @@ namespace PlexRequests.UI.Modules { Log.Debug("User is the account owner"); authenticated = true; + isOwner = true; userId = GetOwnerId(plexSettings.PlexAuthToken, username); } Log.Debug("Friends list result = {0}", authenticated); @@ -228,15 +232,26 @@ namespace PlexRequests.UI.Modules { var defaultSettings = UserManagementSettings.GetSettings(); loginGuid = Guid.NewGuid(); + + var defaultPermissions = (Permissions)UserManagementHelper.GetPermissions(defaultSettings); + if (isOwner) + { + // If we are the owner, add the admin permission. + if (!defaultPermissions.HasFlag(Permissions.Administrator)) + { + defaultPermissions += (int)Permissions.Administrator; + } + } + // Looks like we still don't have an entry, so this user does not exist await PlexUserRepository.InsertAsync(new PlexUsers { - PlexUserId = GetUserIdIsInPlexFriends(username, plexSettings.PlexAuthToken) ?? string.Empty, + PlexUserId = userId, UserAlias = string.Empty, - Permissions = UserManagementHelper.GetPermissions(defaultSettings), + Permissions = (int)defaultPermissions, Features = UserManagementHelper.GetPermissions(defaultSettings), - Username = username, - EmailAddress = string.Empty, // We don't have it, we will get it on the next scheduled job run + Username = username, + EmailAddress = string.Empty, // We don't have it, we will get it on the next scheduled job run (in 30 mins) LoginId = loginGuid.ToString() }); } diff --git a/PlexRequests.UI/Modules/UserManagementModule.cs b/PlexRequests.UI/Modules/UserManagementModule.cs index 4fc7b8d9d..3066b2c52 100644 --- a/PlexRequests.UI/Modules/UserManagementModule.cs +++ b/PlexRequests.UI/Modules/UserManagementModule.cs @@ -44,7 +44,7 @@ namespace PlexRequests.UI.Modules Get["/"] = x => Load(); Get["/users", true] = async (x, ct) => await LoadUsers(); - Post["/createuser", true] = async (x,ct) => await CreateUser(); + Post["/createuser", true] = async (x, ct) => await CreateUser(); Get["/local/{id}"] = x => LocalDetails((Guid)x.id); Get["/plex/{id}", true] = async (x, ct) => await PlexDetails(x.id); Get["/permissions"] = x => GetEnum(); @@ -91,6 +91,7 @@ namespace PlexRequests.UI.Modules { var dbUser = plexDbUsers.FirstOrDefault(x => x.PlexUserId == u.Id); var userDb = userLogins.FirstOrDefault(x => x.UserId == u.Id); + // We don't have the user in the database yet if (dbUser == null) { @@ -102,6 +103,15 @@ namespace PlexRequests.UI.Modules model.Add(MapPlexUser(u, dbUser, userDb?.LastLoggedIn ?? DateTime.MinValue)); } } + + // Also get the server admin + var account = PlexApi.GetAccount(plexSettings.PlexAuthToken); + if (account != null) + { + var dbUser = plexDbUsers.FirstOrDefault(x => x.PlexUserId == account.Id); + var userDb = userLogins.FirstOrDefault(x => x.UserId == account.Id); + model.Add(MapPlexAdmin(account, dbUser, userDb?.LastLoggedIn ?? DateTime.MinValue)); + } } return Response.AsJson(model); } @@ -193,7 +203,6 @@ namespace PlexRequests.UI.Modules localUser.Permissions = permissionsValue; localUser.Features = featuresValue; - var currentProps = ByteConverterHelper.ReturnObject(localUser.UserProperties); // Let's check if the alias has changed, if so we need to change all the requests associated with this @@ -232,6 +241,24 @@ namespace PlexRequests.UI.Modules return Response.AsJson(retUser); } + // So it could actually be the admin + var account = PlexApi.GetAccount(plexSettings.PlexAuthToken); + if (plexDbUser != null && account != null) + { + // We have a user in the DB for this Plex Account + plexDbUser.Permissions = permissionsValue; + plexDbUser.Features = featuresValue; + + await UpdateRequests(plexDbUser.Username, plexDbUser.UserAlias, model.Alias); + + plexDbUser.UserAlias = model.Alias; + + await PlexUsersRepository.UpdateAsync(plexDbUser); + + var retUser = MapPlexAdmin(account, plexDbUser, userLogin?.LastLoggedIn ?? DateTime.MinValue); + return Response.AsJson(retUser); + } + // We have a Plex Account but he's not in the DB if (plexUser != null) { @@ -256,12 +283,11 @@ namespace PlexRequests.UI.Modules private async Task UpdateRequests(string username, string oldAlias, string newAlias) { + var newUsername = string.IsNullOrEmpty(newAlias) ? username : newAlias; // User the username if we are clearing the alias + var olderUsername = string.IsNullOrEmpty(oldAlias) ? username : oldAlias; // Let's check if the alias has changed, if so we need to change all the requests associated with this - if (!oldAlias.Equals(newAlias, StringComparison.CurrentCultureIgnoreCase)) + if (!olderUsername.Equals(newUsername, StringComparison.CurrentCultureIgnoreCase)) { - var newUsername = string.IsNullOrEmpty(newAlias) ? username : newAlias; // User the username if we are clearing the alias - var olderUsername = string.IsNullOrEmpty(oldAlias) ? username : oldAlias; - var requests = await RequestService.GetAllAsync(); // Update all requests var requestsWithThisUser = requests.Where(x => x.RequestedUsers.Contains(olderUsername)).ToList(); @@ -371,35 +397,9 @@ namespace PlexRequests.UI.Modules LastLoggedIn = lastLoggedIn, }; - // Add permissions - foreach (var p in Enum.GetValues(typeof(Permissions))) - { - var perm = (Permissions)p; - var displayValue = EnumHelper.GetDisplayValue(perm); - var pm = new CheckBox - { - Name = displayValue, - Selected = permissions.HasFlag(perm), - Value = (int)perm - }; - m.Permissions.Add(pm); - } - - // Add features - foreach (var p in Enum.GetValues(typeof(Features))) - { - var perm = (Features)p; - var displayValue = EnumHelper.GetDisplayValue(perm); - var pm = new CheckBox - { - Name = displayValue, - Selected = features.HasFlag(perm), - Value = (int)perm - }; - - m.Features.Add(pm); - } + m.Permissions.AddRange(GetPermissions(permissions)); + m.Features.AddRange(GetFeatures(features)); return m; } @@ -429,6 +429,42 @@ namespace PlexRequests.UI.Modules }, }; + m.Permissions.AddRange(GetPermissions(permissions)); + m.Features.AddRange(GetFeatures(features)); + + return m; + } + + private UserManagementUsersViewModel MapPlexAdmin(PlexAccount plexInfo, PlexUsers dbUser, DateTime lastLoggedIn) + { + if (dbUser == null) + { + dbUser = new PlexUsers(); + } + var features = (Features)dbUser?.Features; + var permissions = (Permissions)dbUser?.Permissions; + + var m = new UserManagementUsersViewModel + { + Id = plexInfo.Id, + PermissionsFormattedString = permissions == 0 ? "None" : permissions.ToString(), + FeaturesFormattedString = features.ToString(), + Username = plexInfo.Username, + Type = UserType.PlexUser, + EmailAddress = plexInfo.Email, + Alias = dbUser?.UserAlias ?? string.Empty, + LastLoggedIn = lastLoggedIn, + }; + + m.Permissions.AddRange(GetPermissions(permissions)); + m.Features.AddRange(GetFeatures(features)); + + return m; + } + + private List GetPermissions(Permissions permissions) + { + var retVal = new List(); // Add permissions foreach (var p in Enum.GetValues(typeof(Permissions))) { @@ -441,9 +477,15 @@ namespace PlexRequests.UI.Modules Value = (int)perm }; - m.Permissions.Add(pm); + retVal.Add(pm); } + return retVal; + } + + private List GetFeatures(Features features) + { + var retVal = new List(); // Add features foreach (var p in Enum.GetValues(typeof(Features))) { @@ -456,10 +498,9 @@ namespace PlexRequests.UI.Modules Value = (int)perm }; - m.Features.Add(pm); + retVal.Add(pm); } - - return m; + return retVal; } } } diff --git a/PlexRequests.UI/Views/Admin/Authentication.cshtml b/PlexRequests.UI/Views/Admin/Authentication.cshtml index f91826003..d8040b3ba 100644 --- a/PlexRequests.UI/Views/Admin/Authentication.cshtml +++ b/PlexRequests.UI/Views/Admin/Authentication.cshtml @@ -4,10 +4,14 @@ @{ var baseUrl = Html.GetBaseUrl(); var formAction = "/admin/authentication"; + + var usermanagement = "/usermanagement"; if (!string.IsNullOrEmpty(baseUrl.ToHtmlString())) { formAction = "/" + baseUrl.ToHtmlString() + formAction; + usermanagement = "/" + baseUrl.ToHtmlString() + usermanagement; } + }
@@ -50,7 +54,7 @@
- User Management + User Management

diff --git a/PlexRequests.UI/Views/Admin/Logs.cshtml b/PlexRequests.UI/Views/Admin/Logs.cshtml index d38658420..5da1d685c 100644 --- a/PlexRequests.UI/Views/Admin/Logs.cshtml +++ b/PlexRequests.UI/Views/Admin/Logs.cshtml @@ -21,7 +21,10 @@