I have created a ExtraProperty for the User called "isActive"
ObjectExtensionManager.Instance.Modules()
.ConfigureSaas(Saas =>
{
Saas.ConfigureTenant(tenant =>
{
tenant.AddOrUpdateProperty<bool>( //property type: string
"isActive", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.DefaultValue = true;
//...other configurations for this property
}
);
});
});
however this is not binding to the ui when i click edit i can see the isActive checkbox but the value is always true even when the isActive checkox doesn't have a tick mark
9 Answer(s)
-
0
hi
- ABP Framework version: vX.X.X
-
0
-
0
I am doing for user not tenant sorry the code is as follows
and i am using 4.3.2
ObjectExtensionManager.Instance.Modules() .ConfigureIdentity(identity => { identity.ConfigureUser(user => { user.AddOrUpdateProperty<bool>( //property type: string "isActive", //property name property => { //validation rules property.Attributes.Add(new RequiredAttribute()); property.DefaultValue = true; //...other configurations for this property } ); }); });
-
0
hi
I can't reproduce the problem.
Can you try this with a brand new project?
-
0
It works for SaaS module which i have modified but doesn't work for the user module
can we do a screen share i can show you!
-
0
hi
Can you share a simple project? liming.ma@volosoft.com
-
0
I found the issue its in the Update method of IndentityUserAppService
await UpdateUserByInput(user, input); input.MapExtraPropertiesTo(user); (await UserManager.UpdateAsync(user)).CheckErrors(); await CurrentUnitOfWork.SaveChangesAsync();
the is not manpping from IdenityUserUpdateDto to IdentityUser hence i added to make modification from this
input.MapExtraPropertiesTo(user);
to
input.MapExtraPropertiesTo(user, MappingPropertyDefinitionChecks.Source);
-
0
Can you pleas elet me know if this is a BUG??
-
0
HI
I can't reproduce the problem.
Can you share a simple project that using template? liming.ma@volosoft.com