Fixed: Survey - check for groupToEditSurvey as well as groupToViewSurvey in canView
This commit is contained in:
parent
0265e1dfbd
commit
79692ca8fe
1 changed files with 3 additions and 2 deletions
|
|
@ -2140,8 +2140,9 @@ sub canTakeSurvey {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
|
|
||||||
return $self->{canTake} if ( defined $self->{canTake} );
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue