Hi guys,
I would like to register / update users while already authenticated. The idea is to log in as admin and, from a “Add/edit user” page, create / edit my users.
My apphost has registration feature
Plugins.Add(new RegistrationFeature());
But when I try to register a new user (using Register route) I get this error:
Updating existing User is not enabled. Sign out to register a new User.
There is another things I would like to ask you: my IAuthRepository is registered this way
container.Register<IAuthRepository>(c => new OrmLiteAuthRepository(c.Resolve<IDbConnectionFactory>())
{
UseDistinctRoleTables = true
});
container.Resolve<IAuthRepository>().InitSchema();
If I understand the meaning of UseDistinctRoleTables property, in this way I should use table UserAuthRole to manage roles and permission, but when I try to do it by using the AssignRoles route I receive the InvalidRoleException even if my admin has “Admin” in its role field in the UserAuth tables.
Do I have to add the admin role for admin user in the UserAuthRole table instead?
Right it means the Roles are stored in a separate UserAuthRole instead of with the UserAuth, in which case you’ll need to use the IManageRoles APIs to manage User Roles.