Subject: [pgAdmin][RM4979]: Configuration files for data sources or similar.

From: Pradip Parkale <[email-masked]>
Date: Thu, 20 Aug 2020 15:58:37 +0530

Hi Hackers,

Please find the attached patch for the shared server implementation.

Few key points:

   1. The admin who is the owner of the server user can share the server
   with other users.
   2. This option will be available only for admin users.
   3. If the user doesn't want to see the shared server then the option to
   hide the shared server is available in preferences.
   4. The user who is not the owner of the server, can't delete the shared
   server and server group.
   5. This option is only available in server mode.

-- 
Thanks & Regards,
Pradip Parkale
Software Engineer | EnterpriseDB Corporation

---

From: Akshay Joshi <[email-masked]>
Date: Fri, 21 Aug 2020 13:55:43 +0530

Hi Pradip

The patch is not applied, can you please rebase and send it again.

On Thu, Aug 20, 2020 at 3:58 PM Pradip Parkale <
[email-masked]> wrote:

>    3. If the user doesn't want to see the shared server then the option
>    to hide the shared server is available in preferences.
>    4. The user who is not the owner of the server, can't delete the
>    shared server and server group.

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Sr. Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*

---

From: Pradip Parkale <[email-masked]>
Date: Fri, 21 Aug 2020 18:00:33 +0530

Hi Akshay,
Please find the updated patch.

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 25 Aug 2020 17:52:48 +0530

Hi Pradip

Following are the GUI review comments:
*Testing Scenario*: I have three users U1 and U2 are Admin and U3 is a
normal user. Login from U1 first time and pgAdmin4 discover all the local
servers. Steps that I perform:

   - Shared one server.
   - Create a group 'Test' and move one server to that group.
   - Share the server of the 'Test' group as well.

*Issues:*

   - When login using U2 or U3 PostgreSQL 9.2 and 10 shown twice which
   should not. Refer below screenshot
   - When expanding the server or clicking on the 'Connect Server' menu of
   the shared server, it opens the properties dialog.
   - Try to update the IPAddress, Port it is not updating for the shared
   server. Check other properties too.
   - When we set "Hide shared server?" setting to true/false. A complete
   browser tree should be refreshed. With the current implementation, each
   group needs to be refreshed individually and the server group still visible
   while refreshing the complete page Browser Tree looks perfect.
   - When there is only one server in a group and we expanded the group
   'Connect to server' dialog appears which should not. (*This may be an old
   issue)
   - Schema Diff shared servers are not visible inside the appropriate
   group in the source and target server list.
   - Documentation changes required (Create a new Redmine).
   - SonarQube shows 1 new Bug and 4 new code smell. (Fixed the Bug, code
   smell can be fixed later)
   - 'pgAdmin4_test_non_admin_credentials' should be added in '
   test_config.json.in' file.
   - For Desktop mode shared server test cases should be skipped. It is
   failing at the moment.

Code review still remains :)

On Fri, Aug 21, 2020 at 6:00 PM Pradip Parkale <
[email-masked]> wrote:

> On Fri, Aug 21, 2020 at 1:55 PM Akshay Joshi <
> [email-masked]> wrote:
>
>> Hi Pradip
>>
>>>    1. The admin who is the owner of the server user can share the
>>>    server with other users.

---

From: Pradip Parkale <[email-masked]>
Date: Tue, 1 Sep 2020 16:47:01 +0530

Hi Akshay,

On Tue, Aug 25, 2020 at 5:53 PM Akshay Joshi <[email-masked]>
wrote:

> Fixed. If the server is auto-discovered and U1 shared the auto-discovered
server(PostgreSQL 9.2 in the above example) and then log in using U2, in
this case, shared server(PostgreSQL 9.2) will not visible to U2 as the same
server will be auto-discovered for U2.

>
>    -
>    - When expanding the server or clicking on the 'Connect Server' menu
>    of the shared server, it opens the properties dialog.
>
> This is expected. Properties dialogue will open the first time for a
shared server where the user has to enter server details. This will happen
for the user who is not the owner of the server.

> Fixed.

>    -
> Fixed.

> This is expected and its an old behavior.

>    -
> Fixed

> Done.

>    -
> Fixed.

> Fixed.

> Fixed.

>>>>    3. If the user doesn't want to see the shared server then the
>>>>    option to hide the shared server is available in preferences.

---

From: Akshay Joshi <[email-masked]>
Date: Wed, 2 Sep 2020 13:48:39 +0530

Hi Pradip

Please fix SonarQube issues that introduce with this patch.

On Tue, Sep 1, 2020 at 4:47 PM Pradip Parkale <
[email-masked]> wrote:

> On Tue, Aug 25, 2020 at 5:53 PM Akshay Joshi <
>>    - SonarQube shows 1 new Bug and 4 new code smell. (Fixed the Bug,
>>    code smell can be fixed later)
>>
>> Fixed.
>
>>

---

From: Pradip Parkale <[email-masked]>
Date: Thu, 3 Sep 2020 12:25:14 +0530

Hi Akshay,

On Wed, Sep 2, 2020 at 1:48 PM Akshay Joshi <[email-masked]>
wrote:

>>> Fixed. If the server is auto-discovered and U1 shared the
>> auto-discovered server(PostgreSQL 9.2 in the above example) and then log in
>> using U2, in this case, shared server(PostgreSQL 9.2) will not visible to
>> U2 as the same server will be auto-discovered for U2.
>>
>>>
>>>    -
>>>    - Try to update the IPAddress, Port it is not updating for the
>>>    shared server. Check other properties too.
>>>
>>> Fixed.
>>
>>>
>>>    -
>>>    - When we set "Hide shared server?" setting to true/false. A
>>>    complete browser tree should be refreshed. With the current implementation,
>>>    each group needs to be refreshed individually and the server group still
>>>    visible while refreshing the complete page Browser Tree looks perfect.
>>>
>>> Fixed.
>>
>>>

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 3 Sep 2020 13:04:58 +0530

Thanks, patch applied.

On Thu, Sep 3, 2020 at 12:25 PM Pradip Parkale <
[email-masked]> wrote:

>>>>    - When expanding the server or clicking on the 'Connect Server'
>>>>    menu of the shared server, it opens the properties dialog.
>>>>
>>>>    - When there is only one server in a group and we expanded the
>>>>    group 'Connect to server' dialog appears which should not. (*This may be an
>>>>    old issue)
>>>>
>>>>    - For Desktop mode shared server test cases should be skipped. It
>>>>    is failing at the moment.
>>>>
>>>> Fixed.
>>>

---

From: Pradip Parkale <[email-masked]>
Date: Thu, 3 Sep 2020 14:07:03 +0530

Hi Akshay,

Please find the patch.

On Thu, Sep 3, 2020 at 1:05 PM Akshay Joshi <[email-masked]>
wrote:

>> On Wed, Sep 2, 2020 at 1:48 PM Akshay Joshi <
>>>>> *Testing Scenario*: I have three users U1 and U2 are Admin and U3 is
>>>>> a normal user. Login from U1 first time and pgAdmin4 discover all the local
>>>>>    - When login using U2 or U3 PostgreSQL 9.2 and 10 shown twice
>>>>>    which should not. Refer below screenshot
>>>>>
>>>>>    - Schema Diff shared servers are not visible inside the
>>>>>    appropriate group in the source and target server list.
>>>>>
>>>>> Fixed
>>>>
>>>>>
>>>>>>>>    4. The user who is not the owner of the server, can't delete
>>>>>>>>    the shared server and server group.

---

From: Akshay Joshi <[email-masked]>
Date: Thu, 3 Sep 2020 14:23:33 +0530

Thanks, patch applied.

---

From: Pradip Parkale <[email-masked]>
Date: Mon, 7 Sep 2020 22:46:59 +0530

Hi Akshay,

Please find attached for the shared server. The server icon was getting
change to the shared server icon in Desktop mode.

On Thu, Sep 3, 2020 at 2:23 PM Akshay Joshi <[email-masked]>
wrote:

>> On Thu, Sep 3, 2020 at 1:05 PM Akshay Joshi <
>>>>>>> *Testing Scenario*: I have three users U1 and U2 are Admin and U3
>>>>>>> is a normal user. Login from U1 first time and pgAdmin4 discover all the
>>>>>>> local servers. Steps that I perform:
>>>>>>>
>>>>>>>    - Shared one server.
>>>>>>>    - SonarQube shows 1 new Bug and 4 new code smell. (Fixed the
>>>>>>>    Bug, code smell can be fixed later)
>>>>>>>
>>>>>>> Fixed.
>>>>>>
>>>>>>>
>>>>>>>    - For Desktop mode shared server test cases should be skipped.
>>>>>>>    It is failing at the moment.
>>>>>>>
>>>>>>> Fixed.
>>>>>>
>>>>>>>>>>    1. The admin who is the owner of the server user can share
>>>>>>>>>>    the server with other users.

---

From: Pradip Parkale <[email-masked]>
Date: Mon, 7 Sep 2020 23:15:37 +0530

Please ignore previous patch. Find the updated patch.

On Mon, Sep 7, 2020 at 10:46 PM Pradip Parkale <
[email-masked]> wrote:

>>>>>>>> This is expected. Properties dialogue will open the first time for
>>>>>>> a shared server where the user has to enter server details. This will
>>>>>>> happen for the user who is not the owner of the server.
>>>>>>>
>>>>>>>>
>>>>>>>>>>>    3. If the user doesn't want to see the shared server then
>>>>>>>>>>>    the option to hide the shared server is available in preferences.

---

From: Akshay Joshi <[email-masked]>
Date: Tue, 8 Sep 2020 12:05:47 +0530

Thanks, patch applied.

On Mon, Sep 7, 2020 at 11:15 PM Pradip Parkale <
[email-masked]> wrote:

>> On Thu, Sep 3, 2020 at 2:23 PM Akshay Joshi <
>>>>>>>>>    - When expanding the server or clicking on the 'Connect
>>>>>>>>>    Server' menu of the shared server, it opens the properties dialog.
>>>>>>>>>
>>>>>>>>>>>>    4. The user who is not the owner of the server, can't
>>>>>>>>>>>>    delete the shared server and server group.