2. Admin should be able to lock the user, as currently it only unlocks it via
user management dialog.
3. There were some indefinite login page loading issues when trying to log in
with invalid password, where it should redirect to the login page again instead.
refs #6337 (Initial patch by Khushboo Vashi)
- Refactor functions to not always return the same value.
- Rename "cls" to "self" or add the missing "self" parameter.
- Remove useless assignment to variables.
1. Boolean checks should not be inverted.
2. The comma operator should not be used.
3. Arguments to built-in functions should match documented types.
4. Redundant pairs of parentheses should be removed.
5. A conditionally executed single line should be denoted by indentation,
6. A while loop should be used instead of a 'for' loop.
Ensure error should be handled properly when LDAP user is created with the same name. Fixes#5420
Fixed an issue where an internal user is not created if the authentication source is set to internal and ldap. Fixes#5432
1) Unable to add a user when there are many users. The dialog went blank. Fixed.
2) The error message did not have a close button. Fixed.
3) When clicked on the add button, then the cursor will focus on the email box of
the new row for convenience.
4) When the dialog opens, the cursor will focus on the search text box.
5) By default, the "User" role will be selected when adding a new user.
Also removed an empty option in the roles dropdown.
6) When the search filter is applied and we try to add an already existing user, the
validation is done only on the filtered data and not on all the users' data.
Fixes#5227
- fixed gettext usage with .format() only for original text with %s
- fixed typos
- fixed translation yes/no buttons in the dialog.
- improved translating sentences without "connecting" words (eg. see web/pgadmin/dashboard/static/js/dashboard.js,
word 'cancel' needs to be translated in the Czech language as 'zrušit' but in another sentence as 'zrušení')
- added gettext for text translations.
1) Fixed usage gettext('') instead of _('') in javascript files.
2) Fixed usage gettext('') instead of `${gettext('')}` in javascript files,
because "pybabel extract" not support extracting from this syntax.
Changes include:
1) Remove underscore-string and sprintf-js packages as we were using only %s. Instead, added a function to do the same. Also changed gettext to behave like sprintf directly.
2) backgrid.sizeable.columns was not used anywhere, removed. @babel/polyfill is deprecated, replaced it with core-js.
3) Moved few css to make sure they get minified and bundled.
4) Added Flask-Compress to send static files as compressed gzip. This will reduce network traffic and improve initial load time for pgAdmin.
5) Split few JS files to make code reusable.
6) Lazy load few modules like leaflet, wkx is required only if geometry viewer is opened. snapsvg loaded only when explain plan is executed. This will improve sqleditor initial opening time.
Reviewed By: Khushboo Vashi
Fixes#4701