Re: [pgAdmin][RM4279] : Issue with File Browser Home button

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
Cc: Akshay Joshi <akshay(dot)joshi(at)enterprisedb(dot)com>, Yogesh Jain <yogesh(dot)jain(at)enterprisedb(dot)com>, Aditya Toshniwal <aditya(dot)toshniwal(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin][RM4279] : Issue with File Browser Home button
Date: 2020-04-28 08:22:27
Message-ID: CA+OCxowR6-nSEQPA_cHfymmL_zemCHhKzNiAvRpnHDAJpDAy4w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi

On Tue, Apr 28, 2020 at 9:17 AM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
wrote:

> Hi Dave,
>
> On Tue, Apr 28, 2020 at 1:31 PM Dave Page <dpage(at)pgadmin(dot)org> wrote:
>
>>
>>
>> On Tue, Apr 28, 2020 at 8:24 AM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
>> wrote:
>>
>>> Hi Yogesh,
>>>
>>> Please find the attached patch to fix the issue in Windows as I
>>> mentioned earlier. Please work on top of this to fix the issue below.
>>>
>>> I can see the issue below in desktop mode. Here home directory is
>>> "C:\Users\neel" but on dialog it shows "C:\" which is wrong.
>>> When we press the "Home" button, it redirects to "C:\Users\neel" which
>>> is correct but again when we press the "back" button, it shows the path
>>> "C:\" which is wrong.
>>> So when the user is in the home directory path and presses the "Back"
>>> button it should remain on the same path. This is not specific to windows
>>> but it should also reproducible in linux as well.
>>> Can you please verify and fix ?
>>>
>>
>> By "Back", do you mean "Parent Directory" (i.e. the button next to the
>> Home button)? If so, shouldn't that take you to C:\Users?
>>
>
> Yes, the button next to the Home button. Here in Desktop mode, the user
> will be currently logged in OS user right ? Do we need to show all the
> users info ? I think we should show the home directory of currently logged
> in OS user ( e.g. C:\Users\neel ), Isn't it ?
>

No - $HOME should be the default location, or the location that the Home
button takes you to, but in Desktop mode the user shouldn't be restricted
to that directory (which is how it would work in a native application).
Obviously in server mode, the user *should* be restricted to the storage
directory (which should be a 'fake' root).

>
>
>>
>>
>>>
>>> [image: Screenshot 2020-04-28 at 11.32.34 AM.png]
>>>
>>> Thanks,
>>> Neel Patel
>>>
>>> On Mon, Apr 27, 2020 at 1:50 PM Neel Patel <neel(dot)patel(at)enterprisedb(dot)com>
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> In windows desktop mode, it gives below error on console log while
>>>> opening file dialog.
>>>>
>>>> [image: Screenshot 2020-04-27 at 1.11.59 PM.png]
>>>>
>>>> Thanks,
>>>> Neel Patel
>>>>
>>>> On Mon, Apr 27, 2020 at 1:22 PM Akshay Joshi <
>>>> akshay(dot)joshi(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi Yogesh
>>>>>
>>>>> Tested on MAC OSX in both the mode (server, desktop) it is showing
>>>>> "/". Please reverify it.
>>>>>
>>>>> On Mon, Apr 27, 2020 at 10:58 AM Yogesh Jain <
>>>>> yogesh(dot)jain(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>>> Hi Hackers,
>>>>>>
>>>>>> I have tested this patch in linux (Ubuntu 18.04) env only , which is
>>>>>> working fine. It will be great if someone can review/test in the Windows
>>>>>> environment as well as I don't have the setup ready for that.
>>>>>>
>>>>>> On Mon, Apr 27, 2020 at 10:47 AM Yogesh Jain <
>>>>>> yogesh(dot)jain(at)enterprisedb(dot)com> wrote:
>>>>>>
>>>>>>> Hi Aditya,
>>>>>>>
>>>>>>> Thanks for the feedback. Here is an updated patch, regarding the
>>>>>>> same.
>>>>>>>
>>>>>>> Please Review.
>>>>>>> PFA.
>>>>>>>
>>>>>>> On Mon, Apr 27, 2020 at 9:05 AM Aditya Toshniwal <
>>>>>>> aditya(dot)toshniwal(at)enterprisedb(dot)com> wrote:
>>>>>>>
>>>>>>>> Hi Yogesh,
>>>>>>>>
>>>>>>>> Just did an eyeball review. You've included homedir path in the
>>>>>>>> response rendered JS file. You're exposing underlying directory structure
>>>>>>>> to users even in server mode. This is not appropriate. This info should
>>>>>>>> remain at the server and not at the client side.
>>>>>>>> + homedir=os.path.expanduser('~'),
>>>>>>>>
>>>>>>>> On Fri, Apr 24, 2020 at 7:26 PM Yogesh Jain <
>>>>>>>> yogesh(dot)jain(at)enterprisedb(dot)com> wrote:
>>>>>>>>
>>>>>>>>> Hi Hackers,
>>>>>>>>>
>>>>>>>>> Attached is the patch to fix the issue with the file browser Home
>>>>>>>>> button.
>>>>>>>>>
>>>>>>>>> FYI : While clicking on the home button it was pointing to the
>>>>>>>>> user's root directory rather than home directory, which is fixed in this
>>>>>>>>> patch.
>>>>>>>>>
>>>>>>>>> Please review.
>>>>>>>>> PFA.
>>>>>>>>>
>>>>>>>>> --
>>>>>>>>> Regards,
>>>>>>>>> Yogesh Jain
>>>>>>>>> 8982696654
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> --
>>>>>>>> Thanks and Regards,
>>>>>>>> Aditya Toshniwal
>>>>>>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>>>>>>>> "Don't Complain about Heat, Plant a TREE"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> Regards,
>>>>>>> Yogesh Jain
>>>>>>> 8982696654
>>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Regards,
>>>>>> Yogesh Jain
>>>>>> 8982696654
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Thanks & Regards*
>>>>> *Akshay Joshi*
>>>>>
>>>>> *Sr. Software Architect*
>>>>> *EnterpriseDB Software India Private Limited*
>>>>> *Mobile: +91 976-788-8246*
>>>>>
>>>>
>>
>> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>

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

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

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Neel Patel 2020-04-28 08:29:03 Re: [pgAdmin][RM4279] : Issue with File Browser Home button
Previous Message Neel Patel 2020-04-28 08:17:35 Re: [pgAdmin][RM4279] : Issue with File Browser Home button