EntityFramework.DynamicFilters icon indicating copy to clipboard operation
EntityFramework.DynamicFilters copied to clipboard

Filter with claim

Open papyr opened this issue 4 years ago • 2 comments

I have been using this as a filter with role, I need to filter with role or claim

1. Support a combination of filter with Role or Claims combination

For e.g. someone may be a manager role or could have audit & finance claim and w

modelBuilder.Filter("RestrictItemsBaseOnAccsess", 
                (IAccessRestrictedItem x, List<string> roles) => x.AccessType == AccessType.Public
                         || roles.Any(r => r == x.AllowedRolesPremissionJsonString),
                 (GlobalFilter ctx) => ctx.IdentityManager.GetCurrentIdentityRoles())

               // How do I support claims /claim manager
               .Filter("RestrictItemsBaseOnAccsess", 
                (IAccessRestrictedItem x, List<string> Claims) => { (x.Name == "Manager" || x.Name == "Finance") };

papyr avatar Feb 25 '21 16:02 papyr

Hello @papyr ,

Thank for your suggestion, one of my developer will look at it but I'm not sure if that will be possible or not.

Best Regards,

Jon


Performance Libraries context.BulkInsert(list, options => options.BatchSize = 1000); Entity Framework ExtensionsEntity Framework ClassicBulk OperationsDapper Plus

Runtime Evaluation Eval.Execute("x + y", new {x = 1, y = 2}); // return 3 C# Eval FunctionSQL Eval Function

JonathanMagnan avatar Feb 26 '21 04:02 JonathanMagnan

I love the eval @JonathanMagnan can you please add a sample to parse an equation from the web

papyr avatar Jan 10 '22 18:01 papyr

@bump 😃

papyr avatar Aug 30 '22 18:08 papyr