X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=Memories.pm;h=87a5ac0036228192f37066404862618339eb095f;hb=1192b9685b24a943cb882e42dac512da19321340;hp=0aebf11fab5cf447bbdadd0b047c800ffbf725b3;hpb=7767c51977a235b2f9205da1a94b07ba55ad2f52;p=memories.git diff --git a/Memories.pm b/Memories.pm index 0aebf11..87a5ac0 100644 --- a/Memories.pm +++ b/Memories.pm @@ -1,7 +1,7 @@ package Memories; use strict; our $VERSION = "1.2"; -use Maypole::Application qw(Upload Authentication::UserSessionCookie -Debug); +use Maypole::Application qw(Authentication::UserSessionCookie); use HTML::TagCloud; use URI; use Memories::Config; @@ -91,6 +91,12 @@ 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"); } + # Don't let 'em go until they've fixed it + if ($r->session and $r->session->{quarantined} and $self->path !~ /js$/) { + $r->table("photo"); $r->action("quarantine"); + $r->model_class("Memories::Photo"); + } return OK; }