On step 6 (at least), the circulation and return page redirect to the
select branch page and nothing is done.
The script should die if the user used is the sql administrator account.
Test plan:
Suppose that the sql admin account is root/root and koha/koha a
superlibrarian account.
1/
perl misc/load_testing/benchmark_staff.pl --steps=6
--url=http://admin.koha.local/cgi-bin/koha/
--password="koha" --user="koha"
should produce:
...
Step 6
...
2/
perl misc/load_testing/benchmark_staff.pl --steps=1
--url=http://admin.koha.local/cgi-bin/koha/
--password="root" --user="root"
should produce:
Authentication successful
You cannot use the database administrator account to launch this script
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
use HTTP::Cookies;
use C4::Context;
use C4::Debug;
+use C4::Members qw ( GetMember );
use URI::Escape;
my ($help, $steps, $baseurl, $max_tries, $user, $password,$short_print);
die "Authentication failure: \n\t" . $resp->status_line;
}
+die "You cannot use the database administrator account to launch this script"
+ unless defined C4::Members::GetMember(userid => $user);
+
# remove some unnecessary garbage from the cookie
$cookie =~ s/ path_spec; discard; version=0//;
$cookie =~ s/Set-Cookie3: //;