Re: [pgAdmin4][Patch] - RM 2186 - Support external authentication sources [LDAP]

2020-04-03 Thread Akshay Joshi
Hi Khushboo

Some more review comments:

   - Fix one small PEP8 issue.
   - If ipAddress or Port is not set in the configuration file then browser
   showing the following data, it should be shown proper error message on the
   login page
  - {"success":0,"errormsg":"Port could not be cast to integer value as
  ''","info":"","result":null,"data":null}
   - Disable the Username field in the User Management dialog if the
   authentication source is set to internal.
   - API Test cases are failing if LDAP related settings are not
   provided in the test_config.json file. If the configuration is not provided
   then LDAP tests should be skipped.

@Dave, I have tested and done the code review. Can you please do it once as
well, whenever Khushboo will fix and send the updated patch?


On Thu, Apr 2, 2020 at 7:00 PM Khushboo Vashi <
khushboo.va...@enterprisedb.com> wrote:

> Hi Akshay,
>
> Please find the attached updated patch.
>
> On Thu, Apr 2, 2020 at 4:55 PM Akshay Joshi 
> wrote:
>
>> Hi Khushboo
>>
>> Following are the initial review comments (GUI):
>>
>> *Desktop Mode: *
>>
>>- KeyError: '_auth_source_manager_obj' in desktop mode. (*Note* error
>>occurs when the patch has applied and server mode is False.)
>>
>> Fixed.
>
>> *Server Mode:*
>>
>> AUTHENTICATION_SOURCES = ['internal']
>>
>>
>>- Try to add a new user with the same email address, it throws a
>>unique key constraint error. Validation was there previously before saving
>>it.
>>
>> Fixed.
>
>> AUTHENTICATION_SOURCES = ['internal', 'ldap']
>>
>>- Try to add a new user with the same email address, it throws
>>unique key constraint error which should not it may possible that the user
>>has the same email address for internal and ldap.
>>
>> If the source is internal, it will not allow but with ldap, we can add
> the user with the same email id.
>
>> AUTHENTICATION_SOURCES = ['ldap']
>>
>>- If ipAddress or Port is not set in the configuration file then
>>browser showing the following data, it should be shown proper error 
>> message
>>on the login page
>>   - {"success":0,"errormsg":"Port could not be cast to integer value
>>   as ''","info":"","result":null,"data":null}
>>
>> Done
>
>>
>>- If IP address and port is provided but it is wrong, it shows the
>>following error, can we make a generic error message? Also clicking on the
>>Close button on that error message is not working.
>>[image: Screenshot 2020-04-02 at 4.23.55 PM.png]
>>
>> I will look into the close button issue as it is an existing issue.
>
>>
>>-
>>- IP address and port of LDAP server are correct, give wrong user
>>name and password, it shows error "Error binding to the LDAP Server: 
>> None".
>>Please correct the appropriate error message.
>>
>> Fixed.
>
>>
>>- All the configuration parameter is correct and tries to log in on
>>LDAP server using username (*not email address*) and password got 
>> following
>>error:
>>
>> current_user.email.split('@')[0] if config.SERVER_MODE is True
>> AttributeError: 'NoneType' object has no attribute 'split'.
>>
>> Fixed.
>
>> Not able to test due to the above error. Please fix and resend the patch.
>>
>
> Thanks,
> Khushboo
>
> Thanks,
> Khushboo
>
>>
>> On Thu, Apr 2, 2020 at 2:06 PM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Resending the patch.
>>> Missed the requirements.txt file in the previous patch.
>>>
>>> Thanks,
>>> Khushboo
>>>
>>> On Wed, Apr 1, 2020 at 5:38 PM Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached updated patch which includes the review
 comments given in the review meeting:

 1. Do not store password for ldap user in sqlite database
 2. Forgot Password : Give error to ldap users
 3. User Management dialog changes
 4. Authentication source display besides username / email after login

 Thanks,
 Khushboo


 On Tue, Mar 24, 2020 at 3:20 PM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Please disregard my previous patch, attached the updated patch. :)
>
>
> On Tue, Mar 24, 2020 at 10:32 AM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Please disregard my previous patch, attached the updated patch.
>>
>> On Tue, Mar 24, 2020 at 10:29 AM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached updated patch.
>>>
>>>
>>> On Tue, Mar 17, 2020 at 4:11 PM Dave Page  wrote:
>>>
 Hi

 On Tue, Mar 17, 2020 at 10:24 AM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi Dave,
>
> Thanks for the review.
>
> On Tue, Mar 17, 2020 at 3:42 PM Dave Page 
> wrote:
>
>> Hi
>>
>> 30 second read of the first versio

[Accessibility] Parse & validate the web pages

2020-04-03 Thread Vishal Sawale
Hi Hackers,

PFA the patch for fixing accessibility issues. Patch includes

   1. Fix for search filter label missing in backgrid.
   2. Fix for broken aria issue for objects menu.

Please review and commit.


Regards,
Vishal


pgadmin_diff.patch
Description: Binary data


Re: [pgAdmin4][Patch] - RM 2186 - Support external authentication sources [LDAP]

2020-04-03 Thread Khushboo Vashi
Hi,

Please find the attached updated patch.

On Fri, Apr 3, 2020 at 1:50 PM Akshay Joshi 
wrote:

> Hi Khushboo
>
> Some more review comments:
>
>- Fix one small PEP8 issue.
>
> Fixed.

>
>- If ipAddress or Port is not set in the configuration file then
>browser showing the following data, it should be shown proper error message
>on the login page
>   - {"success":0,"errormsg":"Port could not be cast to integer value
>   as ''","info":"","result":null,"data":null}
>
> Fixed.

>
>- Disable the Username field in the User Management dialog if the
>authentication source is set to internal.
>
> Done.

>
>- API Test cases are failing if LDAP related settings are not
>provided in the test_config.json file. If the configuration is not provided
>then LDAP tests should be skipped.
>
> Fixed.

> @Dave, I have tested and done the code review. Can you please do it once
> as well, whenever Khushboo will fix and send the updated patch?
>
> Thanks,
Khushboo

>
> On Thu, Apr 2, 2020 at 7:00 PM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Hi Akshay,
>>
>> Please find the attached updated patch.
>>
>> On Thu, Apr 2, 2020 at 4:55 PM Akshay Joshi <
>> akshay.jo...@enterprisedb.com> wrote:
>>
>>> Hi Khushboo
>>>
>>> Following are the initial review comments (GUI):
>>>
>>> *Desktop Mode: *
>>>
>>>- KeyError: '_auth_source_manager_obj' in desktop mode. (*Note*
>>>error occurs when the patch has applied and server mode is False.)
>>>
>>> Fixed.
>>
>>> *Server Mode:*
>>>
>>> AUTHENTICATION_SOURCES = ['internal']
>>>
>>>
>>>- Try to add a new user with the same email address, it throws a
>>>unique key constraint error. Validation was there previously before 
>>> saving
>>>it.
>>>
>>> Fixed.
>>
>>> AUTHENTICATION_SOURCES = ['internal', 'ldap']
>>>
>>>- Try to add a new user with the same email address, it throws
>>>unique key constraint error which should not it may possible that the 
>>> user
>>>has the same email address for internal and ldap.
>>>
>>> If the source is internal, it will not allow but with ldap, we can add
>> the user with the same email id.
>>
>>> AUTHENTICATION_SOURCES = ['ldap']
>>>
>>>- If ipAddress or Port is not set in the configuration file then
>>>browser showing the following data, it should be shown proper error 
>>> message
>>>on the login page
>>>   - {"success":0,"errormsg":"Port could not be cast to integer
>>>   value as ''","info":"","result":null,"data":null}
>>>
>>> Done
>>
>>>
>>>- If IP address and port is provided but it is wrong, it shows the
>>>following error, can we make a generic error message? Also clicking on 
>>> the
>>>Close button on that error message is not working.
>>>[image: Screenshot 2020-04-02 at 4.23.55 PM.png]
>>>
>>> I will look into the close button issue as it is an existing issue.
>>
>>>
>>>-
>>>- IP address and port of LDAP server are correct, give wrong user
>>>name and password, it shows error "Error binding to the LDAP Server: 
>>> None".
>>>Please correct the appropriate error message.
>>>
>>> Fixed.
>>
>>>
>>>- All the configuration parameter is correct and tries to log in on
>>>LDAP server using username (*not email address*) and password got 
>>> following
>>>error:
>>>
>>> current_user.email.split('@')[0] if config.SERVER_MODE is True
>>> AttributeError: 'NoneType' object has no attribute 'split'.
>>>
>>> Fixed.
>>
>>> Not able to test due to the above error. Please fix and resend the patch.
>>>
>>
>> Thanks,
>> Khushboo
>>
>> Thanks,
>> Khushboo
>>
>>>
>>> On Thu, Apr 2, 2020 at 2:06 PM Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Resending the patch.
 Missed the requirements.txt file in the previous patch.

 Thanks,
 Khushboo

 On Wed, Apr 1, 2020 at 5:38 PM Khushboo Vashi <
 khushboo.va...@enterprisedb.com> wrote:

> Hi,
>
> Please find the attached updated patch which includes the review
> comments given in the review meeting:
>
> 1. Do not store password for ldap user in sqlite database
> 2. Forgot Password : Give error to ldap users
> 3. User Management dialog changes
> 4. Authentication source display besides username / email after login
>
> Thanks,
> Khushboo
>
>
> On Tue, Mar 24, 2020 at 3:20 PM Khushboo Vashi <
> khushboo.va...@enterprisedb.com> wrote:
>
>> Please disregard my previous patch, attached the updated patch. :)
>>
>>
>> On Tue, Mar 24, 2020 at 10:32 AM Khushboo Vashi <
>> khushboo.va...@enterprisedb.com> wrote:
>>
>>> Please disregard my previous patch, attached the updated patch.
>>>
>>> On Tue, Mar 24, 2020 at 10:29 AM Khushboo Vashi <
>>> khushboo.va...@enterprisedb.com> wrote:
>>>
 Hi,

 Please find the attached updated patch.


 On Tue, Mar 17, 2020 at 4:

pgAdmin 4 commit: Added support of Packages, Sequences and Synonyms to

2020-04-03 Thread Akshay Joshi
Added support of Packages, Sequences and Synonyms to the Schema Diff. Fixes 
#5264

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=ce89ae3c1d4125daa311916e59645abf47829ca1

Modified Files
--
docs/en_US/release_notes_4_21.rst  |   1 +
.../servers/databases/schemas/packages/__init__.py |  19 +-
.../templates/packages/ppas/9.2_plus/create.sql|   1 +
.../templates/packages/ppas/9.2_plus/update.sql|   7 +-
.../databases/schemas/sequences/__init__.py|  52 +-
.../servers/databases/schemas/synonyms/__init__.py |  49 -
.../schemas/synonyms/static/js/synonym.js  |   2 +
.../templates/synonyms/sql/default/delete.sql  |   3 +-
web/pgadmin/tools/schema_diff/directory_compare.py |  80 +---
.../tools/schema_diff/tests/pg/10_plus/source.sql  |  47 +
.../tools/schema_diff/tests/pg/10_plus/target.sql  |  44 +
.../tools/schema_diff/tests/pg/11_plus/source.sql  |  47 +
.../tools/schema_diff/tests/pg/11_plus/target.sql  |  44 +
.../tools/schema_diff/tests/pg/12_plus/source.sql  |  47 +
.../tools/schema_diff/tests/pg/12_plus/target.sql  |  44 +
.../tools/schema_diff/tests/pg/9.2_plus/source.sql |  47 +
.../tools/schema_diff/tests/pg/9.2_plus/target.sql |  44 +
.../schema_diff/tests/ppas/10_plus/source.sql  | 208 +
.../schema_diff/tests/ppas/10_plus/target.sql  | 195 +++
.../schema_diff/tests/ppas/9.2_plus/source.sql | 208 -
.../schema_diff/tests/ppas/9.2_plus/target.sql | 192 +++
21 files changed, 1346 insertions(+), 35 deletions(-)



pgAdmin 4 commit: Fixed some accessibility issues:

2020-04-03 Thread Akshay Joshi
Fixed some accessibility issues:
  1) Added missing search filter label in backgrid.
  2) broken aria issue for objects menu.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=99a72e529b5e38f92c9f5d091dc599c86eb8cb98
Author: Vishal Sawale 

Modified Files
--
web/pgadmin/browser/static/js/browser.js  | 2 +-
web/pgadmin/static/js/backgrid.pgadmin.js | 4 
2 files changed, 5 insertions(+), 1 deletion(-)



pgAdmin 4 commit: Replace the existing color picker - spectrum-colorpic

2020-04-03 Thread Akshay Joshi
Replace the existing color picker - spectrum-colorpicker with @simonwep/pickr.

spectrum-colorpicker has accessibility issues and is not maintained since long

Part of #5197

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=824e3866d86cfcafef9394a175cd2590227a6c28
Author: Aditya Toshniwal 

Modified Files
--
web/package.json  |   2 +-
web/pgadmin/static/css/style.css  |   1 -
web/pgadmin/static/js/backform.pgadmin.js | 109 +++
web/pgadmin/static/scss/_pickr.overrides.scss |  19 ++
web/pgadmin/static/scss/pgadmin.scss  |   1 +
web/webpack.shim.js   |   6 +-
web/webpack.test.config.js|   2 +-
web/yarn.lock | 248 ++
8 files changed, 120 insertions(+), 268 deletions(-)



Re: [Accessibility] Parse & validate the web pages

2020-04-03 Thread Akshay Joshi
Thanks, patch applied.

On Fri, Apr 3, 2020 at 2:37 PM Vishal Sawale 
wrote:

> Hi Hackers,
>
> PFA the patch for fixing accessibility issues. Patch includes
>
>1. Fix for search filter label missing in backgrid.
>2. Fix for broken aria issue for objects menu.
>
> Please review and commit.
>
>
> Regards,
> Vishal
>
>
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


Re: [pgAdmin][RM5197] Accessibility issues of external packages

2020-04-03 Thread Akshay Joshi
Thanks, patch applied.

On Thu, Apr 2, 2020 at 4:46 PM Aditya Toshniwal <
aditya.toshni...@enterprisedb.com> wrote:

> Hi Hackers,
>
> Attached patch will replace the existing color picker -
> spectrum-colorpicker with @simonwep/pickr.
> spectrum-colorpicker has accessibility issues and is not maintained since
> long. @simonwep/pickr is actively maintained and the package is improving
> its accessibility actively.
>
> Please review.
>
> --
> Thanks and Regards,
> Aditya Toshniwal
> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
> "Don't Complain about Heat, Plant a TREE"
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


[pgAdmin][RM4512] PgAgent Jobs: The Calendar is not opening properly on the Exception tab inside schedules tab

2020-04-03 Thread Aditya Toshniwal
Hi Hackers,

Attached is a small patch fixes the Calendar opening issue on the Exception
tab inside the schedules tab.
This is the only solution I found. The datetimepicker package does not
provide any way to place the DOM in the body. The solution is will display
the picker completely but you need to scroll a bit.

Please review.

-- 
Thanks and Regards,
Aditya Toshniwal
pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
"Don't Complain about Heat, Plant a TREE"


RM4512.patch
Description: Binary data


RM5351 - Cleanup compilation warnings

2020-04-03 Thread Dave Page
Patch attached for $SUBJECT.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


RM5351.patch
Description: Binary data


pgAdmin 4 commit: Added an option to prevent a browser tab being opened

2020-04-03 Thread Akshay Joshi
Added an option to prevent a browser tab being opened at startup. Fixes #5353

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=4da327088c864aa406ca99561590557a2519fde5
Author: Dave Page 

Modified Files
--
docs/en_US/desktop_deployment.rst |   6 ++
docs/en_US/release_notes_4_21.rst |   1 +
runtime/ConfigWindow.cpp  |  17 ++
runtime/ConfigWindow.h|   2 +
runtime/ConfigWindow.ui   | 113 +++---
runtime/MenuActions.cpp   |   3 +
runtime/pgAdmin4.cpp  |  34 +++-
7 files changed, 142 insertions(+), 34 deletions(-)



pgAdmin 4 commit: Fixed RESQL test cases for Packages.

2020-04-03 Thread Akshay Joshi
Fixed RESQL test cases for Packages.

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=99e4c3350f1495f218dd51c40f4a4b3d2fcbef55

Modified Files
--
.../packages/tests/ppas/10_plus/alter_package_headers_and_comment.sql| 1 +
.../packages/tests/ppas/10_plus/create_package_with_all_options.sql  | 1 +
.../packages/tests/ppas/10_plus/create_package_with_all_options_msql.sql | 1 +
.../packages/tests/ppas/9.2_plus/alter_package_headers_and_comment.sql   | 1 +
.../packages/tests/ppas/9.2_plus/create_package_with_all_options.sql | 1 +
.../tests/ppas/9.2_plus/create_package_with_all_options_msql.sql | 1 +
6 files changed, 6 insertions(+)



pgAdmin 4 commit: Fixed compilation warnings while building pgAdmin. Fi

2020-04-03 Thread Akshay Joshi
Fixed compilation warnings while building pgAdmin. Fixes #5351

Branch
--
master

Details
---
https://git.postgresql.org/gitweb?p=pgadmin4.git;a=commitdiff;h=e26a9a25d510a38a6f7ffdfa92d3bc801f2f11c3
Author: Dave Page 

Modified Files
--
docs/en_US/release_notes_4_21.rst | 3 ++-
runtime/Server.cpp| 4 ++--
2 files changed, 4 insertions(+), 3 deletions(-)



Re: RM5351 - Cleanup compilation warnings

2020-04-03 Thread Akshay Joshi
Thanks, patch applied.

On Fri, Apr 3, 2020 at 6:25 PM Dave Page  wrote:

> Patch attached for $SUBJECT.
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


-- 
*Thanks & Regards*
*Akshay Joshi*

*Sr. Software Architect*
*EnterpriseDB Software India Private Limited*
*Mobile: +91 976-788-8246*


[PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.

2020-04-03 Thread Pradip Parkale
Hi Hackers,

Please find an attached patch for key navigation in Table >> Parameter. I
have added a key down event to handle the key navigation.


-- 
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation


RM5275.patch
Description: Binary data