Thanks a lot. It's fixed now
I applied this on your library on my node_modules and I'll be waiting this to appear in the upcoming release as I don't want to maintain your library code in every new deployment.
That really works! Many thanks Alper!
Thanks Alper for your quick response
I tried a method too, and it still get the initial value. I even added a breakpoint to that method to see if it's called when I reach the query that should apply the filter, but it's not reached.
it's reached only once, when app is bootstrapped but not after
Hi Ismcagdas
The problem that filter gets the initial value available in that object which in turn resolves it from settings, but when that setting changed, filter still get the initial value and never changed.
Please note that I didn't follow exactly what you did (didn't implement null pattern), should I do so? do you believe it should fix the problem? If yes, can you please provide an amended version for your code here (I get that setting value from a property in that custom session object): <a class="postlink" href="https://gist.github.com/ismcagdas/6f2a9a3b5d7b907cb8d94a72124d59a1">https://gist.github.com/ismcagdas/6f2a9 ... 72124d59a1</a>
Thanks
Hi Alper
How can I use User setting value in the custom filter I added? It seems this filter runs once in app bootstrap for all objects that implement my interface, when AbpSession object is null (no UserId nor TenantId).
Would be great if you can provide a sample
Thanks
Thank you. I agree, it's easier to handle this through configurations rather than a Claim
Hi
I use ASP.NET Core with Angular version and I implemented a custom session (used MyAppSession example suggested by you), and I'm able to add a custom property and get it anywhere in the app. The problem that I need to allow user change this Claim value in the app, and when I try to do this, Claim is changed in that Request context, but not persisted over further requests and I still get the initial value set in Login. I understand that I should ReLogin user after changing Claim. Can you please provide me the needed steps using "MyAppSession" example for ASP.NET Core version (with .NET Framework)? I do prefer a better approach like Refreshing Identity if that's an option.
Second question: MyAppSession is injected and used in a custom data filter in AppDbContext, but it doesn't resolve the Claim Value there (Hardcoded value works in that filter) seems some LifeCycle related problem?
Appreciate your assistance solving these issues
Thanks @ismcagdas for your quick response.
I understand. In that case, I'll try to use the approach of directing users to own multiple linked accounts instead.
One related question, I'm planning to allow users switch between their different assigned roles. Do you have instructions about this somewhere?