From 0a0cb09397284df378c00f09e812c9d76ca2a556 Mon Sep 17 00:00:00 2001 From: David Delikat Date: Wed, 22 Feb 2012 17:55:25 +0000 Subject: [PATCH 1/5] changed plan from 53 to 57 --- t/Asset/Wobject/Survey.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 1612067b3a5636e118cc8bb0f9da959b6f048f00 Mon Sep 17 00:00:00 2001 From: David Delikat Date: Thu, 23 Feb 2012 20:42:59 +0000 Subject: [PATCH 2/5] assign default empty array to priv properties --- lib/WebGUI/Middleware/WGAccess.pm | 4 ++++ 1 file changed, 4 insertions(+) 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'; From e6535e4d1897ec86cc7ce21981db826b4ef93ccd Mon Sep 17 00:00:00 2001 From: David Delikat Date: Thu, 23 Feb 2012 22:36:59 +0000 Subject: [PATCH 3/5] removed WebGUI::Utility and WebGUI::Cache because they no longer exist; no other changes as all tests are skipped --- t/Group/ldap_groups.t | 2 -- 1 file changed, 2 deletions(-) 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; From fec47c110d283f2b0c5aff3865d9c692087583bb Mon Sep 17 00:00:00 2001 From: David Delikat Date: Thu, 23 Feb 2012 22:39:56 +0000 Subject: [PATCH 4/5] fixed test for approval --- t/Asset/EMSSubmissionForm.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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(); From 2274bd59ecb5ad5b83717758fe4d4d443ab8d8e2 Mon Sep 17 00:00:00 2001 From: David Delikat Date: Fri, 24 Feb 2012 15:09:28 +0000 Subject: [PATCH 5/5] use correct name to get auth instance --- lib/WebGUI/Operation/Settings.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index 856dc5c0d7..9520cbc8da 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -656,7 +656,7 @@ sub www_editSettings { # Get fieldsets for avaiable auth methods foreach my $authName (@{$session->config->get("authMethods")}) { - my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,1); + my $authInstance = WebGUI::Operation::Auth::getInstance($session,$authName,1); $tabform->getTab( "auth" )->addFieldset( $authInstance->editUserSettingsForm, name => $authName, label => $authName ); }