Browse Source

Changed downloads to also check logged in user for premium status

tags/3.0.0
Teknikode 2 years ago
parent
commit
700762bc15
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      Teknik/Areas/Upload/Controllers/UploadController.cs

+ 2
- 1
Teknik/Areas/Upload/Controllers/UploadController.cs View File

@@ -161,7 +161,8 @@ namespace Teknik.Areas.Upload.Controllers
contentType = uploads.ContentType;
contentLength = uploads.ContentLength;
dateUploaded = uploads.DateUploaded;
premiumAccount = uploads.User != null && uploads.User.AccountType == AccountType.Premium;
premiumAccount = (uploads.User != null && uploads.User.AccountType == AccountType.Premium) ||
(User.Identity.IsAuthenticated && User.Info != null && User.Info.AccountType == AccountType.Premium);
}
else
{

Loading…
Cancel
Save