diff --git a/lib/WebGUI/Middleware/WGAccess.pm b/lib/WebGUI/Middleware/WGAccess.pm index a51fed001d..686c2a8281 100644 --- a/lib/WebGUI/Middleware/WGAccess.pm +++ b/lib/WebGUI/Middleware/WGAccess.pm @@ -59,6 +59,10 @@ sub call { else { $privs = JSON->new->utf8->decode($contents); } + # in some cases there is nothing but state; default each list to an empty array + $privs->{user} ||= [ ]; + $privs->{groups} ||= [ ]; + $privs->{assets} ||= [ ]; return @$r = (403, [ 'Content-Type' => 'text/plain' ], [ 'Forbidden' ]) if $privs->{state} eq 'trash'; diff --git a/t/Asset/EMSSubmissionForm.t b/t/Asset/EMSSubmissionForm.t index f81a6b2d26..57df258664 100644 --- a/t/Asset/EMSSubmissionForm.t +++ b/t/Asset/EMSSubmissionForm.t @@ -348,7 +348,7 @@ $sub1 = $sub1->cloneFromDb; diag $sub1->submissionStatus; diag $sub1->ticketId; diag $sub1->getRevisionCount; -is( $sub1->get('submissionStatus'),'created','approval successfull'); +is( $sub1->get('submissionStatus'),'approved','approval successfull'); my $ticket = eval { WebGUI::Asset->newById($session, $sub1->get('ticketId')); }; my $e = Exception::Class->caught(); diff --git a/t/Asset/Wobject/Survey.t b/t/Asset/Wobject/Survey.t index 0b615412f0..3af842adde 100644 --- a/t/Asset/Wobject/Survey.t +++ b/t/Asset/Wobject/Survey.t @@ -17,7 +17,7 @@ my $session = WebGUI::Test->session; #---------------------------------------------------------------------------- # Tests -plan tests => 53; +plan tests => 57; #---------------------------------------------------------------------------- # put your tests here diff --git a/t/Group/ldap_groups.t b/t/Group/ldap_groups.t index 998fe4cb8e..a6cbe6987f 100644 --- a/t/Group/ldap_groups.t +++ b/t/Group/ldap_groups.t @@ -14,11 +14,9 @@ use lib "$FindBin::Bin/../lib"; use WebGUI::Test; use WebGUI::Session; -use WebGUI::Utility; use WebGUI::User; use WebGUI::Group; -use WebGUI::Cache; use Test::More skip_all => 'Disabled until the test LDAP server is rejuvenated'; use Test::Deep;