feat: hide product prices from unauthenticated (guest) users
Build and Deploy to Kubernetes / build-and-deploy (push) Successful in 4m48s

Guests can browse products and product details for presentation purposes,
but prices are hidden behind a 'وارد شوید' prompt (lock icon).
Authenticated users see prices as before.

Affected pages:
- Landing page (Index): top-selling regular + discount sections
- Store/Products list
- Store/ProductDetail (desktop price + mobile sticky bar)
- DiscountStore/Products list
- DiscountStore/ProductDetail (full price box)

Each code-behind now checks AuthService.IsAuthenticatedAsync() on init
and stores the result in _isAuthenticated for use in the template.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
masoodafar-web
2026-05-14 19:58:28 +03:30
parent e5b1e11895
commit 2874b931df
10 changed files with 150 additions and 73 deletions
@@ -17,6 +17,8 @@ public partial class Index : IDisposable
[Inject] private GuestActionGate GuestGate { get; set; } = default!;
[Inject] private VATService VAT { get; set; } = default!;
private bool _isAuthenticated;
// ── CMS page data ──
private PageSettingsDto? _pageData;
private LandingSettings? _settings;
@@ -44,6 +46,7 @@ public partial class Index : IDisposable
protected override async Task OnInitializedAsync()
{
MainService.OnChangeHandler += OnStateChanged;
_isAuthenticated = await AuthService.IsAuthenticatedAsync();
// Load landing page settings from CMS
try