Commit Graph

67 Commits (37d82d457cd1e27f12c1f41ac2ceffbf1f1a94f1)

Author SHA1 Message Date
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
Dave Page 7d0fe669ca Code tidy. 2016-06-21 14:21:06 +01:00
Dave Page 3026b470e9 Optimise Python imports. 2016-06-21 14:12:14 +01:00
Harshal Dhumal 6cfa022e35 Validate email addresses when creating the config DB. 2016-06-10 16:19:46 +01:00
Harshal Dhumal e3ab4501d5 User management. 2016-06-06 13:34:08 +01:00
Ashesh Vashi f682f06c94 Adding a background process executor, and observer.
We will be using the external utilities like pg_dump, pg_dumpall,
pg_restore in background. pgAdmin 4 can be run as a CGI script, hence -
it is not good idea to run those utility in a controlled environment.
The process executor will run them in background, and we will execute
the process executor in detached mode.

Now that - the process executor runs in detached mode, we need an
observer, which will look at the status of the processes. It also reads
output, and error logs on demand.

Thanks - Surinder for helping in some of the UI changes.
2016-05-13 08:49:51 +05:30
Neel Patel 12ae40fe62 Procedural language debugger. 2016-04-14 21:36:04 +01:00