Tks @maliming, but have look to previous exchanges... I already extend entities but for Permission is specific.
And want to extend Permission or PermissionSetting and be able to filter on added property.
Any idea ?
Can you please give me a hint on how to extend permission entity and use it over aspnetzero ?
I also found abstract class PersmissionSetting
<a class="postlink" href="https://github.com/aspnetboilerplate/aspnetboilerplate/blob/dev/src/Abp.Zero.Common/Authorization/PermissionSetting.cs">https://github.com/aspnetboilerplate/as ... Setting.cs</a>
When I subclass it with an additional property and run migration, AbpPermission table is updated ! I don't really know how ! Should be a mapping somewhere.
What should I do then : subclass Permission class or PermissionSetting class ? And how to filter permissions over PermissionManager after ?
I already tried to subclass Permission with new class PermissionWithExternal
public class PermissionWithExternal : Permission
{
public bool IsExternal { get; set; }
public PermissionWithExternal(string name, ILocalizableString displayName = null, ILocalizableString description = null, MultiTenancySides multiTenancySides = MultiTenancySides.Tenant | MultiTenancySides.Host, IFeatureDependency featureDependency = null, bool isExternal = false) : base(name, displayName, description, multiTenancySides, featureDependency)
{
}
}
Migration for this is not working. I have following exception : No suitable constructor found for entity type 'Permission'. The following parameters could not be bound to properties of the entity: 'name', 'displayName', 'description', 'featureDependency'.
Even so, I still not found how to filter permissions based on derived entity PermissionWithExternal ! I can see that the static class PermissionManagerExtensions is used to add specific method... but then, I'm lost !
My goal is to override method CreateChildPermission and have possibility to define IsExternal property to true or false.
Can you please guide me ?
?
About data filtering limitation with EF Core : [https://aspnetboilerplate.com/Pages/Documents/Data-Filters#orm-integrations])
Tks @aaron,
You can subclass Permission, add a flag, and then use it to filter.
How can I subclass Permission ?
Last but not least, where would you suggest to do the filtering :
@aaron : thank you for your help.
I decided to create two additional pages on account module : this allows anonymous user to submit a ticket with its email address :
I'm using classic auth has you suggested
Being in same angular account module was easier and allows to open login page, forgot password... and all other pages in this module.
I'm not going to use a specific role for this kind of user... in fact, this users are considered as "externals" and should NEVER have access to the entire backend application and functionnalities (like chat feature).
To do this, I'm planning to extend user entity with a boolean property "IsExternal". But I'm facing some chalenges with this design like :
Hi,
I had some issues with my Xamarin App and didn't took time to reproduce and explain this issue. From your message, I can see that we have the same issue.
Tks, it works ! I just need to be careful because all settings are received from server even if only just one setting has been changed.
thank you @ismcagdas
I also had a discussion with a zero user that implement this kind of solution : <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/issues/975">https://github.com/aspnetzero/aspnet-ze ... issues/975</a>
@ismcagdas I quite sure that this is linked with angular cli.
<a class="postlink" href="https://github.com/angular/angular-cli/issues/5775">https://github.com/angular/angular-cli/issues/5775</a>
I've been upgrading my aspnetzero project for a while now. I already had this kind of issue with angular 4 (if I remember well...) and this problem went gone after an angular update.
Actualy, deactivating sourcemap allows me to continue development like I did before. Hope that nexts angular updates will fix this.