Skip to content

Commit

Permalink
Update Configure.AuthRepository.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
mythz committed Dec 13, 2023
1 parent 661527d commit 4569966
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions MyApp/Configure.AuthRepository.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ServiceStack;
using ServiceStack.Admin;
using ServiceStack.Web;
using ServiceStack.Auth;
using ServiceStack.Configuration;
Expand Down Expand Up @@ -41,6 +42,9 @@ public void Configure(IWebHostBuilder builder) => builder
var authRepo = appHost.Resolve<IAuthRepository>();
authRepo.InitSchema();
CreateUser(authRepo, "[email protected]", "Admin User", "p@55wOrd", roles:new[]{ RoleNames.Admin });
// Admin Users UI at /admin-ui/users
appHost.Plugins.Add(new AdminUsersFeature());
}, afterConfigure: appHost =>
appHost.AssertPlugin<AuthFeature>().AuthEvents.Add(new AppUserAuthEvents()));

Expand Down

0 comments on commit 4569966

Please sign in to comment.