Only allow authenticated users to view photos.

This commit is contained in:
Aaron van Geffen 2016-09-04 16:17:02 +02:00
parent aa04c5ee04
commit 6d07a47132
1 changed files with 4 additions and 0 deletions

View File

@ -10,6 +10,10 @@ class ViewPhoto extends HTMLController
{
public function __construct()
{
// Ensure we're logged in at this point.
if (!Registry::get('user')->isLoggedIn())
throw new NotAllowedException();
$photo = Asset::fromSlug($_GET['slug']);
if (empty($photo))
throw new NotFoundException();