LedgerSMB
LedgerSMB copied to clipboard
Rewrite setup.pl
This issue aims to achieve multiple goals:
- Separate logins to the main application (login.pl) from setup application
- Improve the setup user interface (and user experience)
- Standardize route declaration
- Simplify URL parsing and route dispatch
- Outsource web-framework maintenance (hook into community efforts)
- Simplify the wrapper code for the '/setup(.pl)' routes
- Increase testability of the code through unit tests (in addition to web tests)
These goals are achieved by:
- Using Dancer as the web framework (addresses (3), (4) and (5))
- Configuring Dancer to use cookie auth with separate cookies for
/setup
and/login
(addresses (1) - Refactoring application functions - beyond wrapping/mapping to libraries - out of
/setup
into libraries (addresses (6) and (7)) - Using a standard web-framework which allows a broader range contributors to contribute to UI improvements
These changes require the following steps to be executed:
- [x] Establish a Dancer integration/ baseline for
/setup
(includes Dancer auth plugins integrating with LedgerSMB type authentication) - [ ] Rewrite the functons of
/setup
- [x] System information / configuration overview
- [x] Listing available databases
- [x] Creation of new databases
- [ ] Database sanity checks
- [ ] Copying of databases
- [ ] Creating database backups
- [ ] Creating database role backups
- [x] Listing of users
- [ ] Creation of new users
- [ ] Modification of user role assignments
- [ ] User password resets
- [ ] Loading of template sets
- [ ] Schema upgrades
- [ ] From LedgerSMB 1.2/1.3
- [ ] From SQL Ledger 2.8/3.0
From #4408, take into account this request:
Suggestion: Adding a way to add/create a database once you have logged in as admin on the setup.pl because if you do not provide a database name and create at the login section of the setup.pl, a list of database is presented to you as a DBA, but you do not have a label + textbox + button to create a database from that exact location.
A simple GET redirection would probably do, since the user already logged ?
Thank you !
From #3314, please consider:
More small issues with setup.pl:
I have the keys, but cannot logout to lock up when I leave.
The field hints for importing vs. creating a user could say something about Postgres databases vs. other lsmb databases. Or the program could catch, recover, query and move forward.
User list is slammed against the left jamb.
On all or most setup.pl pages, there is space to have help paragraphs to the right, like many SOHO routers and network interfaces.
Conversely, space could used to combine the user list and user entry pages to make entry smoother. But just returning to the user list from user entry should suffice.
In the attempted installation from github #4655, I find that I am unable to reset a user password from /setup.pl. I see that the "user password resets" box above is unchecked. Does this mean that it is not currently expected to be able to reset a user password from setup.pl? I wanted to check before I filed a new issue for something that is already known. Thanks for clarifying.
From #1198 (contributed by @sbts):
There are a number of user experience issues with the current implementation of setup.pl
The first one is we need some help information on the login screen. at the moment it is expected that users just know that the Database field will either
- create a new db if the text is not a valid db name
- allow changes to and/or backup of an existing db if the text is a valid db name
Really the Database field is probably not needed here these days. Instead
- simple login screen
- once logged in present a list or dropdown list of available DB's
- make the list filterable (dojo can filter select elements)
- add a button "Create New Company Database"
- add text that makes it clear that the company name is the database name
Once you have opened a config page for a specific DB there are a couple of other issues.
- If the db is not a recognised ledgersmb db the cancel button should not be labeled "Yes" but either "cancel" or "back".
- The backup buttons should not be active, or not visible at all.
- when the cancel or back button is clicked it should return to the list, rather than the login screen
Which got this response by @ehuelsmann :
First we need to define what setup.pl means to be/contribute
Given that we're moving to Vue and web services and the fact that there is no real good services infrastructure in Dancer, this looks like an idea more than an actionable enhancement. Converting to an idea discussion type.