Filter with claim
papyr opened this issue · 3 comments
papyr commented
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") };
JonathanMagnan commented
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 Extensions • Entity Framework Classic • Bulk Operations • Dapper Plus
Runtime Evaluation
Eval.Execute("x + y", new {x = 1, y = 2}); // return 3
C# Eval Function • SQL Eval Function
papyr commented
I love the eval @JonathanMagnan can you please add a sample to parse an equation from the web