Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Custom Session Variable? #5551


User avatar
0
mdframe created

I have a situation where a tenant has multiple warehouses. Users can work in a single warehouse or change periodically based on duties and needs. I am looking for insight with ASPNET.Zero on how best to implement. I was thinking they could sign in and set a warehouse id and add that to the session or extend the user entity. I prefer not to make customs to Abp if possible but if the community feels this is the best method then I must. I also wonder if a user wants to set this every time they log in as well.

Thoughts on how to approach this solution with the great framework?

Thanks,

Matt


5 Answer(s)
  • User Avatar
    0
    aaron created
    Support Team

    This is a good use case for settings. Read the documentation on Setting Management.

  • User Avatar
    0
    mdframe created

    Thank you very much for the speedy reply and information! I really appreciate providing this level of feedback to my needs. I will read through the documentation and let you know if I have any other questions.

    Thanks again,

    Matt

  • User Avatar
    0
    alper created
    Support Team

    If you want to store that value in a session variable, here's how you can add a new custom field to AbpSession <a class="postlink" href="https://github.com/aspnetzero/aspnet-zero-core/wiki#adding-a-new-field-to-abpsession-claims">https://github.com/aspnetzero/aspnet-ze ... ion-claims</a>

  • User Avatar
    0
    mcb2323 created

    This link above did not work.

  • User Avatar
    0
    aaron created
    Support Team

    You need to login with your GitHub account to access the private repo. You can invite yourself here: <a class="postlink" href="https://aspnetzero.com/LicenseManagement">https://aspnetzero.com/LicenseManagement</a>