𝙉𝙞𝙘𝙠
Access user claims + set attributes of called method in Global Query filter
Solved! Did it with httpcontext.items, i set the properties there in my attribute (properties that are set on the attribute) using a key value pair.
Next, I can access it in the context of the dbcontext.
Attribute is called first since you want to authorize etc before you query. So the execution order is good too.
3 replies
Access user claims + set attributes of called method in Global Query filter
Ok I have an idea which may work...... but it's kind of dirty.
Im still searching and looking for the best solution.
But I think, in the attribute i want to target, i can probaply append something to the context of the attribute. Which is then appended to the httpcontext of the request everywhere, and based on that i can do my checks. But I'll continue searching if theres a better way (not even sure if this is possibly, should be in theory..)
3 replies