Hello,
On my Mac, I used these steps to download and run,
$ x download NetCoreApps/NorthwindCrud -out NorthwindCrud
$ cd NorthwindCrud
$ dotnet run
I am interested in using the feature described in https://docs.servicestack.net/studio-users. Is there a “x mix ???” that I can add to get access to “AdminUsersFeature”? When I tried “x mix feature-authrepo”, it added 2 files, but that did not enable user management in Studio. Can you please help?
Regards.
It’s as the docs say you just need to register the AdminUsersFeature
Plugin in your AppHost that’s in Startup.cs
Plugins.Add(new AdminUsersFeature());
Then you need to add an Admin user, e.g. by adding a new user with the Admin
role in Configure.Auth.cs
:
EnsureUser("admin@gmail.com", name:"The Admin", roles:new[]{ "Admin" });
Then when you start the app and view the home page:
$ dotnet run
The home page has a link to open Studio with the app
dotnet tool:
app://studio?connect=https://localhost:5001
Where you should see your app appear in the UI:
Then click the Users button and sign in with your Admin user, e.g. admin@gmail.com
1 Like
Perfect , that worked like a charm. Thanks very much.
1 Like