diff --git a/conf/IdPAccountManager.conf b/conf/IdPAccountManager.conf index 8ed6bb6aa13fd63c3d9072be7924106e2e31a391..ba6538fb5d09fea5a1cbc2483c30e0ff5c7c610f 100644 --- a/conf/IdPAccountManager.conf +++ b/conf/IdPAccountManager.conf @@ -25,8 +25,8 @@ idp_displayname = eduGAIN Access Check # Root simpleSamlPhp directory root_ssp_dir = /opt/testidp/simplesamlphp -# Root test account manager directory -root_manager_dir = /opt/testidp/IdPAccountManager +# Templates directory +templates_dir = templates # Database type refers to a Perl Database Driver name # However only a subset of existing DBDs are supported by Rose::DB::Object: diff --git a/lib/IdPAccountManager/Tools.pm b/lib/IdPAccountManager/Tools.pm index 4af9e280102764b3252f210d2d7ce048fcc23a4f..03bcbded683b10ac2558f8b95320f7d941a8486f 100644 --- a/lib/IdPAccountManager/Tools.pm +++ b/lib/IdPAccountManager/Tools.pm @@ -77,11 +77,10 @@ sub generate_password { ## Updates simpleSamlPhp authsources.php configuration file sub update_ssp_authsources { - my ($root_manager_dir, $conf) = @_; + my ($templates_dir, $conf) = @_; my $tt2 = Template->new({ - INCLUDE_PATH => $root_manager_dir . ':' . - $root_manager_dir . '/templates/accountProfiles' + INCLUDE_PATH => $templates_dir }); my %args = ( accounts => IdPAccountManager::TestAccount::Data::Manager->get_testaccounts(), diff --git a/lib/IdPAccountManager/WebRequest.pm b/lib/IdPAccountManager/WebRequest.pm index ca25f1e26dba569fc0da047d0afce34603e91902..c6f30417b125c39fe409e771ee0a43673395e1c4 100755 --- a/lib/IdPAccountManager/WebRequest.pm +++ b/lib/IdPAccountManager/WebRequest.pm @@ -168,9 +168,7 @@ sub respond { escape_quotes => [ \&IdPAccountManager::Tools::escape_quotes, 0 ] }, - INCLUDE_PATH => $self->{configuration}->{root_manager_dir} . ':' - . $self->{configuration}->{root_manager_dir} - . '/templates/accountProfiles', + INCLUDE_PATH => $self->{configuration}->{templates_dir} } ); @@ -581,7 +579,7 @@ sub req_validate_token { ## Update simpleSAMLphp configuration to enable test accounts unless (IdPAccountManager::Tools::update_ssp_authsources( - $self->{configuration}->{root_manager_dir}, + $self->{configuration}->{templates_dir}, $self->{configuration} )) { push @{ $self->{out}->{errors} }, "accounts_creation_failed";