diff --git a/README.md b/README.md index f18889da6..188c3baf0 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ Search the existing requests to see if your suggestion has already been submitte # Preview - + # Installation diff --git a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs index 9751176ea..fc743eb0a 100644 --- a/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs +++ b/src/Ombi.Schedule/Jobs/Plex/PlexUserImporter.cs @@ -93,9 +93,12 @@ namespace Ombi.Schedule.Jobs.Plex } if (userManagementSettings.DefaultRoles.Any()) { + // Get the new user object to avoid any concurrency failures + var dbUser = + await _userManager.Users.FirstOrDefaultAsync(x => x.UserName == newUser.UserName); foreach (var defaultRole in userManagementSettings.DefaultRoles) { - await _userManager.AddToRoleAsync(newUser, defaultRole); + await _userManager.AddToRoleAsync(dbUser, defaultRole); } } } diff --git a/src/Ombi/ClientApp/app/app.module.ts b/src/Ombi/ClientApp/app/app.module.ts index ab79b8fe9..06f18b923 100644 --- a/src/Ombi/ClientApp/app/app.module.ts +++ b/src/Ombi/ClientApp/app/app.module.ts @@ -15,12 +15,14 @@ import { JwtModule } from "@auth0/angular-jwt"; import { NgbModule } from "@ng-bootstrap/ng-bootstrap"; import { TranslateLoader, TranslateModule } from "@ngx-translate/core"; import { TranslateHttpLoader } from "@ngx-translate/http-loader"; +import { CookieService } from "ng2-cookies"; import { GrowlModule } from "primeng/components/growl/growl"; import { ButtonModule, CaptchaModule,ConfirmationService, ConfirmDialogModule, DataTableModule,DialogModule, SharedModule, TooltipModule } from "primeng/primeng"; // Components import { AppComponent } from "./app.component"; +import { CookieComponent } from "./auth/cookie.component"; import { PageNotFoundComponent } from "./errors/not-found.component"; import { LandingPageComponent } from "./landingpage/landingpage.component"; import { LoginComponent } from "./login/login.component"; @@ -55,6 +57,7 @@ const routes: Routes = [ { path: "reset", component: ResetPasswordComponent }, { path: "token", component: TokenResetPasswordComponent }, { path: "landingpage", component: LandingPageComponent }, + { path: "auth/cookie", component: CookieComponent }, ]; // AoT requires an exported function for factories @@ -120,6 +123,7 @@ export function HttpLoaderFactory(http: HttpClient, platformLocation: PlatformLo LandingPageComponent, ResetPasswordComponent, TokenResetPasswordComponent, + CookieComponent, ], providers: [ RequestService, @@ -132,6 +136,7 @@ export function HttpLoaderFactory(http: HttpClient, platformLocation: PlatformLo LandingPageService, ConfirmationService, ImageService, + CookieService, ], bootstrap: [AppComponent], }) diff --git a/src/Ombi/ClientApp/app/requests/movierequests.component.html b/src/Ombi/ClientApp/app/requests/movierequests.component.html index 1b2e0751e..628282c81 100644 --- a/src/Ombi/ClientApp/app/requests/movierequests.component.html +++ b/src/Ombi/ClientApp/app/requests/movierequests.component.html @@ -36,26 +36,26 @@