Commit Graph

73 Commits (5a228761768f179aa5636acad4b05a20c780f07d)

Author SHA1 Message Date
Akshay Joshi 98184e5835 Update copyright notices for 2023 2023-01-02 11:53:55 +05:30
Akshay Joshi e17c50d304
Added support for storing configurations of pgAdmin in an external database. #1832 2022-10-20 16:18:41 +05:30
Akshay Joshi 71c962f51c Fixed ModuleNotFoundError when running setup.py to load/dump servers. Fixes #7663
Patch Sent By: Karl Maximilian Daenner
2022-09-06 11:48:55 +05:30
Akshay Joshi 72f819ec67 Ensure that the dump servers functionality works from setup.py. Fixes #7644 2022-08-31 14:28:48 +05:30
Akshay Joshi 3a69d50458 Change the logic to call setup_db if the database doesn't exist. 2022-07-01 18:12:00 +05:30
Akshay Joshi bf7de8e7a5 Fixed an issue where the create_app() function was called twice if an SQLite database file was not present.
Remove the exec call to run the 'setup.py' instead call the setup database function directly.
2022-07-01 14:50:12 +05:30
Akshay Joshi 7fe1d89891 Fixed import/export servers issue reported during testing. 2022-01-10 16:16:10 +05:30
Akshay Joshi 2786f7ac5a Update copyright notices for 2022 2022-01-04 13:54:25 +05:30
Akshay Joshi 9dd957a2aa Added support to import/export server groups and servers from GUI. Fixes #4803 2022-01-04 12:27:17 +05:30
Cyril Jouve 718ac02806 Fixed ModuleNotFoundError when running setup.py from outside of the root. Fixes #6408 2021-04-27 12:54:57 +05:30
Yogesh Mahajan 53f5562468 Fixed an issue where correct error not thrown while importing servers and JSON file has incorrect/insufficient keys. Fixes #6076 2021-04-02 08:58:43 +05:30
Akshay Joshi 008bc6da28 Fixed some SonarQube issues. 2021-03-02 14:53:05 +05:30
Alessandro De Maria faa66f1636 Added '--replace' option in Import server to replace the list of servers with the newly imported one. Fixes #6270 2021-03-01 18:00:06 +05:30
Akshay Joshi b372f08a59 Update copyright notices for 2021 2021-01-04 15:34:45 +05:30
Nikhil Mohite 1c5cb63aff Fixed an issue where shared servers import is failing. Fixes #6022 2020-12-03 10:40:52 +05:30
Azad Salahli 43f1953aa7 Fixed incorrect import in setup.py 2020-09-28 17:47:38 +05:30
Aditya Toshniwal 535739c0c7 Fixed cognitive complexity issues reported by SonarQube. 2020-09-09 11:25:43 +05:30
Pradip Parkale b562ab7681 Added shared server support for admin users. Fixes #4979 2020-09-03 12:59:28 +05:30
Aditya Toshniwal 8f3bdf1cf3 Fixed cognitive complexity issues reported by SonarQube. 2020-09-02 14:39:54 +05:30
Rahul Shirsat b5c299c5ad Fixed an issue where --load-server does not allow loading connections that use pg_services. Fixes #5746 2020-08-31 17:49:46 +05:30
Cyril Jouve 5a253f9053 Change the following to replace Python 2 code with Python 3:
1) Replace the deprecated unit test method.
2) Wraps filter usage in a list call.
3) Converts the old metaclass syntax to new.
4) Use range instead of xrange method.
5) Change Unicode to str.
6) Several other transformations.
7) Fixed change password test cases.
8) Use simplejson instead of plain JSON.
2020-08-31 16:45:31 +05:30
Aditya Toshniwal 1050c9857a Fixed an issue when dumping servers from a desktop pgAdmin app by providing an option '--sqlite-path'. Fixes #5521 2020-06-01 11:22:38 +05:30
Akshay Joshi ad80217593 Remove Python2 references from the source code.
refs #5443

Initial patch: Neel Patel
2020-04-30 17:22:48 +05:30
Dave Page 01c7636c75 Update copyright notices for 2020. 2020-01-02 14:43:50 +00:00
Dave Page ea4dbd31e8 Don't try to set permissions on Windows. It won't work anyway. Fixes #4276 2019-05-20 13:53:08 +01:00
Dave Page d728ee7436 Ensure sanity of the permissions on the storage and session directories and the config database. Fixes #4182 2019-04-17 16:57:34 +01:00
Dave Page 73b144c45c Fix an issue where importing servers fails if a group already exists for a different user. Fixes #4022 2019-02-21 15:40:37 +00:00
Murtuza Zabuawala e23d307c56 Update copyright notices for 2019 2019-01-02 15:54:12 +05:30
Dave Page f0327f5219 Add the ability to import and export server definitions from a config database. Fixes #3772 2018-11-21 16:09:20 +00:00
Murtuza Zabuawala 393ce53d2d Fix PEP8 issues in the Tools module. Fixes #3063 2018-01-26 16:54:21 +00:00
Dave Page 89821c0d19 Update copyright notices for 2018. 2018-01-05 10:42:50 +00:00
Surinder Kumar 7835da267b Allow pgAdmin to run with config database versions from the future. Fixes #2664 2017-08-29 15:03:02 +01:00
Dave Page a65f7b330b Ensure builtins.SERVER_MODE is handled if running setup.py standalone. 2017-08-25 11:56:44 +01:00
Ashesh Vashi b095d1f33a Ensure the initial password is properly hashed during setup in web mode. Fixes #2492 2017-07-10 16:08:35 +01:00
Khushboo Vashi 1ee555e468 Ensure the feature tests use the correct test settings database. Fixes #2486 2017-06-16 10:17:38 +01:00
Sarah McAlear 6283ef7f5e [Configuration][Migration] Use 'alembic' for migration of the SQLite
based configuration file from one version to another, and also allows us
to have a single path of creating the table instead of creating tables
using SQLAlchemy or hand rolled SQL

This allows us to run the migrations directly in the code, and it will
avoid the error prone version numbering.

Patched by: Sarah McAlear
Revisions: Joao Pedro De Almeida Pereira, George Gelashvili.
Reviewed by: Ashesh Vashi, Murtuza Zabuawala
2017-04-24 08:37:27 +05:30
Ashesh Vashi f2fc1ceba8 Resolved quite a few file-system encoding/decoding related cases.
In order to resolve the non-ascii characters in path (in user directory,
storage path, etc) on windows, we have converted the path into the
short-path, so that - we don't need to deal with the encoding issues
(specially with Python 2).

We've resolved majority of the issues with this patch.
We still need couple issues to resolve after this in the same area.

TODO
* Add better support for non-ascii characters in the database name on
  windows with Python 3
* Improve the messages created after the background processes by
  different modules (such as Backup, Restore, Import/Export, etc.),
  which does not show short-paths, and xml representable characters for
  non-ascii characters, when found in the database objects, and the file
  PATH.

Fixes #2174, #1797, #2166, #1940

Initial patch by: Surinder Kumar
Reviewed by: Murtuza Zabuawala
2017-03-07 15:31:03 +05:30
George Gelashvili 19be3529f8 Create a template loader for SQL templates.
This will automatically find the correct version of a template for the server version, and allows us to remove templates that were previously duplicated for different server versions.

Patch by George & Tira at Pivotal. Review by me and Murtuza from EDB.

Discussion: https://www.postgresql.org/message-id/flat/CAHowoHaU9_pkCt%2B1g8dpY3hsXXZmsJZiJH-3-_Hd%2BC1MxiGhtA%40mail.gmail.com#CAHowoHaU9_pkCt+1g8dpY3hsXXZmsJZiJH-3-_Hd+C1MxiGhtA@mail.gmail.com
2017-01-30 11:25:03 +00:00
Dave Page f221194bcc Update copyright notices for 2017. 2017-01-04 13:33:32 +00:00
Ashesh Vashi d4c439d64a Ensure the auto-generated CSRF_SESSION_KEY, SECRET_KEY,
SECURITY_PASSWORD_SALT keys are decoded as string for python 3
compatibility.

Fixes #1871
2016-10-20 13:16:31 +05:30
Ashesh Vashi 19df1e3f4b Ensure SECURITY_PASSWORD_SALT is set to something when initialising (to avoid errors, prior to being set to the 'real' value). Fixes #1871 2016-10-19 14:04:07 +01:00
Dave Page bc5cc964a3 Move security keys into the SQLite database, and auto-generate them.
This avoids packagers having to deal with the issue, which can be
difficult if they need to cater for both server and desktop modes.

Fixes #1849
2016-10-19 09:22:38 +01:00
Dave Page 7175929cab Ensure that the directory paths are as they should be under the runtime. Note that this change requires (for now) the regression tests to be run from the web/regression directory. 2016-09-26 16:38:27 +01:00
Navnath Gadakh d3d8836f61 Introduce a test config database for the regression tests, and track/remove objects that are created during testing. 2016-09-14 16:26:12 +01:00
Dave Page 60659975ed Stop using deprecated imports. 2016-07-22 16:25:23 +01:00
Dave Page d79524ff60 Require passwords to be at least 6 chars long in setup.py. Fixes #1322 2016-06-30 14:16:30 +01:00
Dave Page 71443deceb Fix email validation 2016-06-30 09:46:06 +01:00
Dave Page d63b54610b Move the config database schema version out of the configuration file and into the model class.
Turns out using the config file isn't a good idea if users copy config.py to config_local.py, as it prevents upgrades to the database. This has the added side-effect of simplifying future changes, as you only need to edit 2 files to modify the config DB now, not 3.
2016-06-24 12:50:52 +01:00
Dave Page 1acc1a7678 Auto-discover locally installed servers at login. Fixes #1389 2016-06-23 16:27:06 +01:00
Murtuza Zabuawala 97d49af43a Fix constraint on server table to allow port 65535 to be used. Fixes #1388 2016-06-23 11:43:50 +01:00