Bug 6516 - koha-create makes assumptions about borrowernumber of staff user
Summary: koha-create makes assumptions about borrowernumber of staff user
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Packaging (show other bugs)
Version: Main
Hardware: All All
: PATCH-Sent (DO NOT USE) normal (vote)
Assignee: Magnus Enger
QA Contact: Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-18 14:54 UTC by Magnus Enger
Modified: 2012-10-25 23:09 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Proposed patch (2.57 KB, patch)
2011-08-17 06:07 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 6516 - Make borrowernumber of staff user configurable in koha-create (2.63 KB, patch)
2011-09-02 03:37 UTC, Robin Sheat
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2011-06-18 14:54:17 UTC
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?
Comment 1 Robin Sheat 2011-06-19 01:57:15 UTC
This seems to me to be a good idea.
Comment 2 Magnus Enger 2011-08-17 06:07:56 UTC Comment hidden (obsolete)
Comment 3 Robin Sheat 2011-09-02 03:37:29 UTC
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>
Comment 4 Chris Cormack 2011-09-04 08:24:47 UTC
Packages related patch, pushed please test
Comment 5 Chris Nighswonger 2011-10-26 18:02:13 UTC
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.