1
0
mirror of https://git.teknik.io/Teknikode/Teknik.git synced 2023-08-02 14:16:22 +02:00

Changed Uploads, Pastes, and URL Shortening to private only.

This commit is contained in:
Chris Woodward 2018-07-25 09:11:33 -07:00
parent 2980817d57
commit 2c43e7fe58
6 changed files with 8 additions and 21 deletions

View File

@ -33,7 +33,6 @@ namespace Teknik.Areas.API.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
[TrackPageView] [TrackPageView]
public ActionResult Upload(APIv1UploadModel model) public ActionResult Upload(APIv1UploadModel model)
{ {
@ -184,7 +183,6 @@ namespace Teknik.Areas.API.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
[TrackPageView] [TrackPageView]
public ActionResult Paste(APIv1PasteModel model) public ActionResult Paste(APIv1PasteModel model)
{ {
@ -232,7 +230,6 @@ namespace Teknik.Areas.API.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
[TrackPageView] [TrackPageView]
public ActionResult Shorten(APIv1ShortenModel model) public ActionResult Shorten(APIv1ShortenModel model)
{ {

View File

@ -103,37 +103,37 @@
<td class="text-left">Pastebin</td> <td class="text-left">Pastebin</td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">File Uploads</td> <td class="text-left">File Uploads</td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">Max Upload Filesize</td> <td class="text-left">Max Upload Filesize</td>
<td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSizePremium)</td> <td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSizePremium)</td>
<td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSizeBasic)</td> <td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSizeBasic)</td>
<td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxUploadSize)</td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">Max Embedded Filesize</td> <td class="text-left">Max Embedded Filesize</td>
<td class="text-center">Unlimited</td> <td class="text-center">Unlimited</td>
<td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxDownloadSize)</td> <td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxDownloadSize)</td>
<td class="text-center">@StringHelper.GetBytesReadable(Model.Config.UploadConfig.MaxDownloadSize)</td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">Url Shortening</td> <td class="text-left">Url Shortening</td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">Vault Creation</td> <td class="text-left">Vault Creation</td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td>
<td class="text-center"><i class="fa fa-check fa-2x text-success"></i></td> <td class="text-center"><i class="fa fa-times fa-2x text-danger"></i></td>
</tr> </tr>
<tr> <tr>
<td class="text-left">Technical Podcasts</td> <td class="text-left">Technical Podcasts</td>

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Data.Entity; using System.Data.Entity;
using System.Linq; using System.Linq;
@ -23,7 +23,6 @@ namespace Teknik.Areas.Paste.Controllers
public class PasteController : DefaultController public class PasteController : DefaultController
{ {
[TrackPageView] [TrackPageView]
[AllowAnonymous]
public ActionResult Index() public ActionResult Index()
{ {
ViewBag.Title = "Paste - " + Config.Title; ViewBag.Title = "Paste - " + Config.Title;
@ -147,7 +146,6 @@ namespace Teknik.Areas.Paste.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
public ActionResult Paste([Bind(Include = "Content, Title, Syntax, ExpireLength, ExpireUnit, Password, Hide")]PasteCreateViewModel model) public ActionResult Paste([Bind(Include = "Content, Title, Syntax, ExpireLength, ExpireUnit, Password, Hide")]PasteCreateViewModel model)
{ {
if (ModelState.IsValid) if (ModelState.IsValid)
@ -190,4 +188,4 @@ namespace Teknik.Areas.Paste.Controllers
return View("~/Areas/Paste/Views/Paste/Index.cshtml", model); return View("~/Areas/Paste/Views/Paste/Index.cshtml", model);
} }
} }
} }

View File

@ -18,7 +18,6 @@ namespace Teknik.Areas.Shortener.Controllers
public class ShortenerController : DefaultController public class ShortenerController : DefaultController
{ {
[TrackPageView] [TrackPageView]
[AllowAnonymous]
public ActionResult Index() public ActionResult Index()
{ {
ViewBag.Title = "Url Shortener - " + Config.Title; ViewBag.Title = "Url Shortener - " + Config.Title;
@ -45,7 +44,6 @@ namespace Teknik.Areas.Shortener.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
public ActionResult ShortenUrl(string url) public ActionResult ShortenUrl(string url)
{ {
if (url.IsValidUrl()) if (url.IsValidUrl())

View File

@ -30,7 +30,6 @@ namespace Teknik.Areas.Upload.Controllers
// GET: Upload/Upload // GET: Upload/Upload
[HttpGet] [HttpGet]
[TrackPageView] [TrackPageView]
[AllowAnonymous]
public ActionResult Index() public ActionResult Index()
{ {
ViewBag.Title = "Teknik Upload - End to End Encryption"; ViewBag.Title = "Teknik Upload - End to End Encryption";
@ -53,7 +52,6 @@ namespace Teknik.Areas.Upload.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
public ActionResult Upload(string fileType, string fileExt, string iv, int keySize, int blockSize, bool encrypt, HttpPostedFileWrapper data) public ActionResult Upload(string fileType, string fileExt, string iv, int keySize, int blockSize, bool encrypt, HttpPostedFileWrapper data)
{ {
try try

View File

@ -103,7 +103,6 @@ namespace Teknik.Areas.Vault.Controllers
[HttpGet] [HttpGet]
[TrackPageView] [TrackPageView]
[AllowAnonymous]
public ActionResult NewVault() public ActionResult NewVault()
{ {
ViewBag.Title = "Create Vault"; ViewBag.Title = "Create Vault";
@ -114,7 +113,6 @@ namespace Teknik.Areas.Vault.Controllers
[HttpGet] [HttpGet]
[TrackPageView] [TrackPageView]
[AllowAnonymous]
public ActionResult NewVaultFromService(string type, string items) public ActionResult NewVaultFromService(string type, string items)
{ {
ViewBag.Title = "Create Vault"; ViewBag.Title = "Create Vault";
@ -239,7 +237,6 @@ namespace Teknik.Areas.Vault.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult CreateVault(ModifyVaultViewModel model) public ActionResult CreateVault(ModifyVaultViewModel model)
{ {
@ -415,7 +412,6 @@ namespace Teknik.Areas.Vault.Controllers
} }
[HttpPost] [HttpPost]
[AllowAnonymous]
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public ActionResult ValidateItem(string type, string url) public ActionResult ValidateItem(string type, string url)
{ {