Fixed: Survey - check for groupToEditSurvey as well as groupToViewSurvey in canView

This commit is contained in:
Patrick Donelan 2009-07-03 01:39:34 +00:00
parent 0265e1dfbd
commit 79692ca8fe

View file

@ -2140,8 +2140,9 @@ sub canTakeSurvey {
my $self = shift;
return $self->{canTake} if ( defined $self->{canTake} );
if ( !$self->session->user->isInGroup( $self->get('groupToTakeSurvey') ) ) {
# Immediately reject if not in groupToTakeSurvey or groupToEditSurvey
if ( !$self->session->user->isInGroup( $self->get('groupToTakeSurvey') ) && !$self->session->user->isInGroup( $self->get('groupToEditSurvey') ) ) {
return 0;
}