Browse Source

Changed downloads to also check logged in user for premium status

pull/111/head
Teknikode 5 years ago
parent
commit
700762bc15
  1. 3
      Teknik/Areas/Upload/Controllers/UploadController.cs

3
Teknik/Areas/Upload/Controllers/UploadController.cs

@ -161,7 +161,8 @@ namespace Teknik.Areas.Upload.Controllers @@ -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