Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "Ricavir"

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 :

  • On Infrastructure Layer ? (custom data filter over EF Core is not supported...)
  • On Domain Layer ? On UserManager, RoleManager, PermissionManager
  • On Application Layer ? On all AppServices

@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 :

  • If emailaddress is recognized, then a ticket is created and an email is sent to him with a link and a password to connect to backend.
  • If emailaddress is not recognized, then a user is created automatically before ticket creation. Like above, an email with its credentials is sent.

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 :

  • separating permissions for classic users and for external users
  • if possible, be able to dedicate roles for classic users and roles for external users
  • adapting user repository to display classic users OR external users (but never displaying both)
  • avoiding to add a role or a OU to an external user

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>

Answer

@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.

Showing 141 to 150 of 232 entries