Toplam Gönderi:
255
Karma:
1395
Katılım:
25.05.2010
yer:
Australia
Hi I was wondering the correct way to check if a user is authenticated in a razor view in 3.1? I wanted to hide parts of the navigation etc depending on if a user is logged in.. can you just use @User.Identity.IsAuthenticated or is there a more correct way?
Toplam Gönderi:
255
Karma:
1395
Katılım:
25.05.2010
yer:
Australia
Thanks for letting me know.. I was hoping to just add this to a base model or something like that but im using the nop-template's mega menu so hooking it in without the source is a little crap..
Toplam Gönderi:
255
Karma:
1395
Katılım:
25.05.2010
yer:
Australia
I ended up using this: EngineContext.Current.Resolve<IPermissionService>().Authorize(StandardPermissionProvider.PublicStoreAllowNavigation)