fixed bug [ 838091 ] Read-Only Forum User Cannot Subscribe
This commit is contained in:
parent
f9661ed755
commit
79eac4f419
2 changed files with 4 additions and 3 deletions
|
|
@ -1677,7 +1677,7 @@ A hash reference containing information passed from the calling object.
|
|||
sub www_forumSubscribe {
|
||||
my ($caller) = @_;
|
||||
my $forum = WebGUI::Forum->new($session{form}{forumId});
|
||||
return WebGUI::Privilege::insufficient() unless ($forum->canPost && $session{user}{userId} != 1);
|
||||
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1);
|
||||
$forum->subscribe;
|
||||
return www_viewForum($caller, $session{form}{forumId});
|
||||
}
|
||||
|
|
@ -2152,7 +2152,7 @@ A hash reference containing information passed from the calling object.
|
|||
sub www_threadSubscribe {
|
||||
my ($caller) = @_;
|
||||
my $post = WebGUI::Forum::Post->new($session{form}{forumPostId});
|
||||
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1 && $post->getThread->getForum->canPost);
|
||||
return WebGUI::Privilege::insufficient() unless ($session{user}{userId} != 1);
|
||||
$post->getThread->subscribe;
|
||||
return www_viewThread($caller, $session{form}{forumPostId});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue