In debian/scripts/koha-create a random password is set for a staff user, but this staff user is hardcoded to have borrowernumber = 3: mysql --host="$mysqlhost" --user="$mysqluser" \ --password="$mysqlpwd" <<eof USE \`$mysqldb\`; UPDATE borrowers SET password = '$staffdigest' WHERE borrowernumber = 3; eof For me it would make sense to have one pre-defined staff user in the DEFAULTSQL file, with borrowernumber = 1. Maybe the borrowernumber of the staff user could be set in /etc/koha/koha-sites.conf?
This seems to me to be a good idea.
Created attachment 5040 [details] [review] Proposed patch This should make it possible to set the borrowernumber of the adminuser both in configfiles (ADMINUSER) and on the commandline (--adminuser or -a). The default is 1. To test the new default: - Create a database dump where the admin user has borrowernumber = 1 - Create an instance - Check that you can log in with the generated password - Create a database dump where the admin user has borrowernumber = 2 - Create an instance, setting ADMINUSER=2 in a configfile - Check that you can log in with the generated password - Create another instance setting "-a 2" on the command line - Check that you can log in with the generated password
Created attachment 5271 [details] [review] Bug 6516 - Make borrowernumber of staff user configurable in koha-create Sets the default borrowernumber of staff user to 1 and makes it possible to override this with ADMINUSER in /etc/koha/koha-sites.conf or with the --adminuser and -a command line options. Remember to update the wiki if this gets pushed! Signed-off-by: Robin Sheat <robin@catalyst.net.nz>
Packages related patch, pushed please test
The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report.