Обсуждение: pgAdmin III commit: Default role support in server configs, quick conne

Поиск
Список
Период
Сортировка

pgAdmin III commit: Default role support in server configs, quick conne

От
Guillaume Lelarge
Дата:
Commit: http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=9af27f4c6978098e31343783994efe56f02b1707

Log Message
-----------
Default role support in server configs, quick connect, backups and restore.

Rolename parameter can be specified in each server's saved configuration.
When a rolename is specified issue a SET role=<rolename> command after a
successfull connection to the server. This allows using pgAdmin's gui to
create/alter/delete objects in accordance with a security policy that
forbids logging in directly as superuser, but instead specifies that you
should log into an admin account and then SET ROLE to the superuser.

It also makes it possible to specify the superuser account at backup
and restore dialogs (pg_dump and pg_restore version >= 8.4 needed).

Patch from Benedek László.

Branch
------
master

Modified Files
--------------
pgadmin/db/pgConn.cpp                     |   24 ++++++++++-
pgadmin/dlg/dlgRole.cpp                   |    2 +-
pgadmin/dlg/dlgSelectConnection.cpp       |   41 +++++++++++++++++--
pgadmin/dlg/dlgServer.cpp                 |    9 ++++-
pgadmin/frm/frmBackup.cpp                 |   26 ++++++++++++
pgadmin/frm/frmBackupGlobals.cpp          |   62 +++++++++++++++++++----------
pgadmin/frm/frmBackupServer.cpp           |   39 +++++++++++++++---
pgadmin/frm/frmMain.cpp                   |    1 +
pgadmin/frm/frmRestore.cpp                |   27 ++++++++++++
pgadmin/frm/frmStatus.cpp                 |    6 ++-
pgadmin/include/db/pgConn.h               |    7 ++-
pgadmin/include/dlg/dlgSelectConnection.h |    2 +-
pgadmin/include/frm/frmBackupGlobals.h    |    1 +
pgadmin/include/frm/frmBackupServer.h     |    1 +
pgadmin/include/schema/pgServer.h         |    6 ++-
pgadmin/pgAdmin3.cpp                      |   12 ++++--
pgadmin/schema/pgRole.cpp                 |    1 +
pgadmin/schema/pgServer.cpp               |   22 ++++++----
pgadmin/ui/dlgSelectConnection.xrc        |   17 ++++++--
pgadmin/ui/dlgServer.xrc                  |   16 ++++++-
pgadmin/ui/frmBackup.xrc                  |   17 +++++++-
pgadmin/ui/frmBackupGlobals.xrc           |   15 ++++++-
pgadmin/ui/frmBackupServer.xrc            |   15 ++++++-
pgadmin/ui/frmRestore.xrc                 |   16 +++++++-
pgadmin/utils/sysSettings.cpp             |    1 +
25 files changed, 315 insertions(+), 71 deletions(-)


Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Dave Page
Дата:
This patch seems to have sizing issue on Windows - basically there
isn't enough space on the dialogue for all the controls now.

It seems like we should move some onto an "Advanced" tab - but I'm
having a hard job persuading myself which should go (particularly as
we normally want a multi-line textbox on the first tab so it looks OK
when resized. The controls it makes most sense to move IMHO, are:

Rolename
DB restriction
Service
Restore env?

If we did that, I suppose the colour button could be resized vertically.

Thoughts?

On Wed, Jul 28, 2010 at 7:41 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
>
> Commit: http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=9af27f4c6978098e31343783994efe56f02b1707
>
> Log Message
> -----------
> Default role support in server configs, quick connect, backups and restore.
>
> Rolename parameter can be specified in each server's saved configuration.
> When a rolename is specified issue a SET role=<rolename> command after a
> successfull connection to the server. This allows using pgAdmin's gui to
> create/alter/delete objects in accordance with a security policy that
> forbids logging in directly as superuser, but instead specifies that you
> should log into an admin account and then SET ROLE to the superuser.
>
> It also makes it possible to specify the superuser account at backup
> and restore dialogs (pg_dump and pg_restore version >= 8.4 needed).
>
> Patch from Benedek László.
>
> Branch
> ------
> master
>
> Modified Files
> --------------
> pgadmin/db/pgConn.cpp                     |   24 ++++++++++-
> pgadmin/dlg/dlgRole.cpp                   |    2 +-
> pgadmin/dlg/dlgSelectConnection.cpp       |   41 +++++++++++++++++--
> pgadmin/dlg/dlgServer.cpp                 |    9 ++++-
> pgadmin/frm/frmBackup.cpp                 |   26 ++++++++++++
> pgadmin/frm/frmBackupGlobals.cpp          |   62 +++++++++++++++++++----------
> pgadmin/frm/frmBackupServer.cpp           |   39 +++++++++++++++---
> pgadmin/frm/frmMain.cpp                   |    1 +
> pgadmin/frm/frmRestore.cpp                |   27 ++++++++++++
> pgadmin/frm/frmStatus.cpp                 |    6 ++-
> pgadmin/include/db/pgConn.h               |    7 ++-
> pgadmin/include/dlg/dlgSelectConnection.h |    2 +-
> pgadmin/include/frm/frmBackupGlobals.h    |    1 +
> pgadmin/include/frm/frmBackupServer.h     |    1 +
> pgadmin/include/schema/pgServer.h         |    6 ++-
> pgadmin/pgAdmin3.cpp                      |   12 ++++--
> pgadmin/schema/pgRole.cpp                 |    1 +
> pgadmin/schema/pgServer.cpp               |   22 ++++++----
> pgadmin/ui/dlgSelectConnection.xrc        |   17 ++++++--
> pgadmin/ui/dlgServer.xrc                  |   16 ++++++-
> pgadmin/ui/frmBackup.xrc                  |   17 +++++++-
> pgadmin/ui/frmBackupGlobals.xrc           |   15 ++++++-
> pgadmin/ui/frmBackupServer.xrc            |   15 ++++++-
> pgadmin/ui/frmRestore.xrc                 |   16 +++++++-
> pgadmin/utils/sysSettings.cpp             |    1 +
> 25 files changed, 315 insertions(+), 71 deletions(-)
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>



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

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

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Guillaume Lelarge
Дата:
Le 24/08/2010 22:54, Dave Page a écrit :
> This patch seems to have sizing issue on Windows - basically there
> isn't enough space on the dialogue for all the controls now.
>
> It seems like we should move some onto an "Advanced" tab - but I'm
> having a hard job persuading myself which should go (particularly as
> we normally want a multi-line textbox on the first tab so it looks OK
> when resized. The controls it makes most sense to move IMHO, are:
>
> Rolename
> DB restriction
> Service
> Restore env?
>
> If we did that, I suppose the colour button could be resized vertically.
>
> Thoughts?
>

I would keep less on the first tab. I think we should probably only keep
the required ones. So:

 * tab 1, name, port, host, ssl, username, password (and perhaps store
   password
 * tab 2, maintenance db, rolenamen restore env., db restriction,
   service, connect now, colour, group.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Dave Page
Дата:
On Tue, Aug 24, 2010 at 10:03 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 24/08/2010 22:54, Dave Page a écrit :
>> This patch seems to have sizing issue on Windows - basically there
>> isn't enough space on the dialogue for all the controls now.
>>
>> It seems like we should move some onto an "Advanced" tab - but I'm
>> having a hard job persuading myself which should go (particularly as
>> we normally want a multi-line textbox on the first tab so it looks OK
>> when resized. The controls it makes most sense to move IMHO, are:
>>
>> Rolename
>> DB restriction
>> Service
>> Restore env?
>>
>> If we did that, I suppose the colour button could be resized vertically.
>>
>> Thoughts?
>>
>
> I would keep less on the first tab. I think we should probably only keep
> the required ones. So:
>
>  * tab 1, name, port, host, ssl, username, password (and perhaps store
>   password
>  * tab 2, maintenance db, rolenamen restore env., db restriction,
>   service, connect now, colour, group.

I think maintenance DB should be on the first tab. I don't object to
moving connect now.  Not sure about colour and group though - group I
think should be on the first tab - and colour seems be be a natural
partner to it.


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

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

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Guillaume Lelarge
Дата:
Le 24/08/2010 23:19, Dave Page a écrit :
> On Tue, Aug 24, 2010 at 10:03 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> Le 24/08/2010 22:54, Dave Page a écrit :
>>> This patch seems to have sizing issue on Windows - basically there
>>> isn't enough space on the dialogue for all the controls now.
>>>
>>> It seems like we should move some onto an "Advanced" tab - but I'm
>>> having a hard job persuading myself which should go (particularly as
>>> we normally want a multi-line textbox on the first tab so it looks OK
>>> when resized. The controls it makes most sense to move IMHO, are:
>>>
>>> Rolename
>>> DB restriction
>>> Service
>>> Restore env?
>>>
>>> If we did that, I suppose the colour button could be resized vertically.
>>>
>>> Thoughts?
>>>
>>
>> I would keep less on the first tab. I think we should probably only keep
>> the required ones. So:
>>
>>  * tab 1, name, port, host, ssl, username, password (and perhaps store
>>   password
>>  * tab 2, maintenance db, rolenamen restore env., db restriction,
>>   service, connect now, colour, group.
>
> I think maintenance DB should be on the first tab. I don't object to
> moving connect now.  Not sure about colour and group though - group I
> think should be on the first tab - and colour seems be be a natural
> partner to it.
>
>

Something like http://lelarge.info/~guillaume/tmp/dlgServer_1.png and
http://lelarge.info/~guillaume/tmp/dlgServer_2.png?


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Dave Page
Дата:
On Tue, Aug 24, 2010 at 10:59 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 24/08/2010 23:19, Dave Page a écrit :
>> On Tue, Aug 24, 2010 at 10:03 PM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>> Le 24/08/2010 22:54, Dave Page a écrit :
>>>> This patch seems to have sizing issue on Windows - basically there
>>>> isn't enough space on the dialogue for all the controls now.
>>>>
>>>> It seems like we should move some onto an "Advanced" tab - but I'm
>>>> having a hard job persuading myself which should go (particularly as
>>>> we normally want a multi-line textbox on the first tab so it looks OK
>>>> when resized. The controls it makes most sense to move IMHO, are:
>>>>
>>>> Rolename
>>>> DB restriction
>>>> Service
>>>> Restore env?
>>>>
>>>> If we did that, I suppose the colour button could be resized vertically.
>>>>
>>>> Thoughts?
>>>>
>>>
>>> I would keep less on the first tab. I think we should probably only keep
>>> the required ones. So:
>>>
>>>  * tab 1, name, port, host, ssl, username, password (and perhaps store
>>>   password
>>>  * tab 2, maintenance db, rolenamen restore env., db restriction,
>>>   service, connect now, colour, group.
>>
>> I think maintenance DB should be on the first tab. I don't object to
>> moving connect now.  Not sure about colour and group though - group I
>> think should be on the first tab - and colour seems be be a natural
>> partner to it.
>>
>>
>
> Something like http://lelarge.info/~guillaume/tmp/dlgServer_1.png and
> http://lelarge.info/~guillaume/tmp/dlgServer_2.png?

Looks good to me. The only changes I'd make are "Advanced" instead of
"Optional" as the new tab name, and ensure Connect Now defaults to on
for new connections.

BTW - did you mock this up directly in the XRC code (as opposed to
Gimp or something)? If so, it's probably easier for you to tweak and
commit that. Otherwise I'll look at it today.

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

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

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Guillaume Lelarge
Дата:
Le 25/08/2010 10:16, Dave Page a écrit :
> On Tue, Aug 24, 2010 at 10:59 PM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>> Le 24/08/2010 23:19, Dave Page a écrit :
>>> On Tue, Aug 24, 2010 at 10:03 PM, Guillaume Lelarge
>>> <guillaume@lelarge.info> wrote:
>>>> Le 24/08/2010 22:54, Dave Page a écrit :
>>>>> This patch seems to have sizing issue on Windows - basically there
>>>>> isn't enough space on the dialogue for all the controls now.
>>>>>
>>>>> It seems like we should move some onto an "Advanced" tab - but I'm
>>>>> having a hard job persuading myself which should go (particularly as
>>>>> we normally want a multi-line textbox on the first tab so it looks OK
>>>>> when resized. The controls it makes most sense to move IMHO, are:
>>>>>
>>>>> Rolename
>>>>> DB restriction
>>>>> Service
>>>>> Restore env?
>>>>>
>>>>> If we did that, I suppose the colour button could be resized vertically.
>>>>>
>>>>> Thoughts?
>>>>>
>>>>
>>>> I would keep less on the first tab. I think we should probably only keep
>>>> the required ones. So:
>>>>
>>>>  * tab 1, name, port, host, ssl, username, password (and perhaps store
>>>>   password
>>>>  * tab 2, maintenance db, rolenamen restore env., db restriction,
>>>>   service, connect now, colour, group.
>>>
>>> I think maintenance DB should be on the first tab. I don't object to
>>> moving connect now.  Not sure about colour and group though - group I
>>> think should be on the first tab - and colour seems be be a natural
>>> partner to it.
>>>
>>>
>>
>> Something like http://lelarge.info/~guillaume/tmp/dlgServer_1.png and
>> http://lelarge.info/~guillaume/tmp/dlgServer_2.png?
>
> Looks good to me. The only changes I'd make are "Advanced" instead of
> "Optional" as the new tab name, and ensure Connect Now defaults to on
> for new connections.
>
> BTW - did you mock this up directly in the XRC code (as opposed to
> Gimp or something)? If so, it's probably easier for you to tweak and
> commit that. Otherwise I'll look at it today.
>

I changed the XRC code. I can finish it this afternoon if you want.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Dave Page
Дата:
On Wed, Aug 25, 2010 at 9:19 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:

> I changed the XRC code. I can finish it this afternoon if you want.

OK thanks - or send it to me if you prefer. Whatever is easiest for you :-)

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

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

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Guillaume Lelarge
Дата:
Le 25/08/2010 10:22, Dave Page a écrit :
> On Wed, Aug 25, 2010 at 9:19 AM, Guillaume Lelarge
> <guillaume@lelarge.info> wrote:
>
>> I changed the XRC code. I can finish it this afternoon if you want.
>
> OK thanks - or send it to me if you prefer. Whatever is easiest for you :-)
>

Forgot to tell, but this was commited yesterday.


--
Guillaume
 http://www.postgresql.fr
 http://dalibo.com

Re: pgAdmin III commit: Default role support in server configs, quick conne

От
Dave Page
Дата:
On Thu, Aug 26, 2010 at 9:33 AM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 25/08/2010 10:22, Dave Page a écrit :
>> On Wed, Aug 25, 2010 at 9:19 AM, Guillaume Lelarge
>> <guillaume@lelarge.info> wrote:
>>
>>> I changed the XRC code. I can finish it this afternoon if you want.
>>
>> OK thanks - or send it to me if you prefer. Whatever is easiest for you :-)
>>
>
> Forgot to tell, but this was commited yesterday.

Thanks.


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

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