From: Simon Cozens Date: Mon, 12 Feb 2007 21:13:58 +0000 (+0000) Subject: Stop anonymous uploads X-Git-Tag: 1.2+svn20070808~37 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=090e12c1f7141a6d5a25014fc33e9b1cc382c0b7;p=memories.git Stop anonymous uploads git-svn-id: http://svn.simon-cozens.org/memories/trunk@31 041978f6-d955-411f-a9d7-1d8545c9c3c7 --- diff --git a/Memories.pm b/Memories.pm index 0aebf11..8536d17 100644 --- a/Memories.pm +++ b/Memories.pm @@ -91,6 +91,7 @@ sub authenticate { my ($self, $r) = @_; return DECLINED if $self->path =~/static|store/; # XXX $r->get_user; + if (!$r->user and $self->path =~ /upload/) { $r->template("login"); } return OK; } diff --git a/Memories/Photo.pm b/Memories/Photo.pm index eef3019..57a53c4 100644 --- a/Memories/Photo.pm +++ b/Memories/Photo.pm @@ -45,7 +45,6 @@ sub do_upload :Exported { my ($self, $r) = @_; my %upload = $r->upload("photo"); - # XXX Stop anonymous uploads! my $photo = $self->create({ uploader => $r->user, uploaded => Time::Piece->new(),