Bug 17459

Summary: Add a script to create a superlibrarian user
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Command-line UtilitiesAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: chris, josef.moravec, kyle, robin, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10337
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 17459: Add a script to create a superlibrarian user
Bug 17459: Add a script to create a superlibrarian user
Bug 17459 Follow up
Bug 17459 Follow up
[SIGNED-OFF] Bug 17459: Add a script to create a superlibrarian user
[SIGNED-OFF] Bug 17459 Follow up
Bug 17459: Add a script to create a superlibrarian user
Bug 17459: Follow up

Description Jonathan Druart 2016-10-17 17:00:47 UTC
As a developer, I'd like to create a superlibrarian user easily, without any clics
Comment 1 Jonathan Druart 2016-10-17 17:03:28 UTC
Created attachment 56608 [details] [review]
Bug 17459: Add a script to create a superlibrarian user

This is for developers: it's quite long (many clics) to create a new
superlibrarian user.
This new script creates a new user with superlibrarian permissions with
the easy to remember credential koha/koha

Test plan:
  perl misc/devel/create_superlibrarian.pl
Log in to Koha using koha/koha
Comment 2 Chris Cormack 2016-10-18 07:49:24 UTC
Would you mind if I did a quick follow up that added the option to pass in username and password as parameters?

(It could still default to koha/koha if they weren't set)
Comment 3 Jonathan Druart 2016-10-18 08:22:54 UTC
(In reply to Chris Cormack from comment #2)
> Would you mind if I did a quick follow up that added the option to pass in
> username and password as parameters?
> 
> (It could still default to koha/koha if they weren't set)

Please do :)
Comment 4 Chris Cormack 2016-10-18 19:58:31 UTC
Created attachment 56630 [details] [review]
Bug 17459: Add a script to create a superlibrarian user

This is for developers: it's quite long (many clics) to create a new
superlibrarian user.
This new script creates a new user with superlibrarian permissions with
the easy to remember credential koha/koha

Test plan:
  perl misc/devel/create_superlibrarian.pl
Log in to Koha using koha/koha

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Comment 5 Chris Cormack 2016-10-18 19:58:45 UTC
Created attachment 56631 [details] [review]
Bug 17459 Follow up

Adding POD and --userid and --password options

1/ To test, use the same routine as before, with no options.
2/ You should have a user with koha/koha as userid and passwords
3/ Delete that user
4/ Run the script with --userid <userid> --password <password>
5/ You should have a user in koha with userid/password set
Comment 6 Chris Cormack 2016-10-18 20:05:06 UTC
Created attachment 56632 [details] [review]
Bug 17459 Follow up

Adding POD and --userid and --password options

1/ To test, use the same routine as before, with no options.
2/ You should have a user with koha/koha as userid and passwords
3/ Delete that user
4/ Run the script with --userid <userid> --password <password>
5/ You should have a user in koha with userid/password set
Comment 7 Josef Moravec 2016-10-19 19:08:28 UTC
Created attachment 56670 [details] [review]
[SIGNED-OFF] Bug 17459: Add a script to create a superlibrarian user

This is for developers: it's quite long (many clics) to create a new
superlibrarian user.
This new script creates a new user with superlibrarian permissions with
the easy to remember credential koha/koha

Test plan:
  perl misc/devel/create_superlibrarian.pl
Log in to Koha using koha/koha

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2016-10-19 19:08:40 UTC
Created attachment 56671 [details] [review]
[SIGNED-OFF] Bug 17459 Follow up

Adding POD and --userid and --password options

1/ To test, use the same routine as before, with no options.
2/ You should have a user with koha/koha as userid and passwords
3/ Delete that user
4/ Run the script with --userid <userid> --password <password>
5/ You should have a user in koha with userid/password set

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Tomás Cohen Arazi 2016-10-24 18:01:29 UTC
Created attachment 56814 [details] [review]
Bug 17459: Add a script to create a superlibrarian user

This is for developers: it's quite long (many clics) to create a new
superlibrarian user.
This new script creates a new user with superlibrarian permissions with
the easy to remember credential koha/koha

Test plan:
  perl misc/devel/create_superlibrarian.pl
Log in to Koha using koha/koha

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 10 Tomás Cohen Arazi 2016-10-24 18:01:38 UTC
Created attachment 56815 [details] [review]
Bug 17459: Follow up

Adding POD and --userid and --password options

1/ To test, use the same routine as before, with no options.
2/ You should have a user with koha/koha as userid and passwords
3/ Delete that user
4/ Run the script with --userid <userid> --password <password>
5/ You should have a user in koha with userid/password set

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Kyle M Hall 2016-10-28 16:57:26 UTC
Pushed to master for 16.11, thanks Jonathan, Chris!