From 498cc4070173eca8fa8d0efa3a1e06b5caf56b93 Mon Sep 17 00:00:00 2001 From: Kaleb Murphy Date: Wed, 10 Sep 2008 20:18:27 +0000 Subject: [PATCH] Users are now prompted to log in, if not logged in, when clicking on an unsubscribe CS email link --- docs/changelog/7.x.x.txt | 1 + lib/WebGUI/Asset/Wobject/Collaboration.pm | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 31db2f1b8..eca61bd9e 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -32,6 +32,7 @@ - added: Inbox messages now tell you who the message was from - fixed: Reoccurring transactions now update the correct user id - fixed: I need a template for this display + - fixed: If a user clicks on an unsubscribe link in an email and they are not logged into WebGUI, they are now prompted to log in so that they can then unsbscribe. 7.5.22 - fixed: Layout template now gets prepared correctly diff --git a/lib/WebGUI/Asset/Wobject/Collaboration.pm b/lib/WebGUI/Asset/Wobject/Collaboration.pm index e421887c9..876b8ed13 100644 --- a/lib/WebGUI/Asset/Wobject/Collaboration.pm +++ b/lib/WebGUI/Asset/Wobject/Collaboration.pm @@ -1472,9 +1472,13 @@ The web method to unsubscribe from a collaboration. =cut sub www_unsubscribe { - my $self = shift; - $self->unsubscribe if $self->canSubscribe; - return $self->www_view; + my $self = shift; + if($self->canSubscribe){ + $self->unsubscribe; + return $self->www_view; + }else{ + return $self->session->privilege->noAccess; + } } #-------------------------------------------------------------------