Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jIlDg-0007ax-9a for pgadmin-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 03:36:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jIlDf-0001Wp-0A for pgadmin-hackers@arkaria.postgresql.org; Mon, 30 Mar 2020 03:36:11 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jIlDe-0001Wi-Lw for pgadmin-hackers@lists.postgresql.org; Mon, 30 Mar 2020 03:36:10 +0000 Received: from mail-lf1-x143.google.com ([2a00:1450:4864:20::143]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jIlDb-0000nm-4g for pgadmin-hackers@lists.postgresql.org; Mon, 30 Mar 2020 03:36:09 +0000 Received: by mail-lf1-x143.google.com with SMTP id q5so12892377lfb.13 for ; Sun, 29 Mar 2020 20:36:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8c32yc/HIvIDvr1SwWCeYLl8ZL0lNpQfVZ3T9B5Zt04=; b=AxK5jQK7LuTINT5v4/kQMMRR86vinKptQQjbWKPXwKI7RQVaUHWYt+8pXyYRoshspA YKcV2fYqkbi7FyioBQ2o4I3iv5aUX+1z4UMvQ0Gk/AOtXIc8FM5ytiPkJZLHTWzQ03oJ 3dJbev+Yklt5YI0fL8L8rCaQb8Fp3tJqgR98h6XLO28yYFEgrJXeu6j+TalHwrBjhswn PB+DvPuJo1skKhYL034gxSkqgyrLJ8fLgFOL3H9HN417P1F9lUGOzbjFtQJvm0i4ByBe mffqBWcOMUD+ZlOTUgp2Y/K7MENDul9PujI0fQ6aQPtFE4ZuEjpRzuinGfCfrVv4k2UK c0DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8c32yc/HIvIDvr1SwWCeYLl8ZL0lNpQfVZ3T9B5Zt04=; b=ZMtF+SPFjZR4XJ5fVHYtntfgHBiI8Bp+oRgHGoH6hW1AjVg6P6mZFMGfGW5L+dUpcL Xs25JV1uLcmTZK2v/8GvzI17hRN61wdaMeq9vwkggICd1ieNq/uKw5kFm3gOn2Duw4CN fM/veD9Qwu/xvIZumvipYcqmtwtNzfOw/MfSP+k873tkkqW5BfSE9mYbVq+OcazgdVKP QkOa3k6ALMY73FDgOIlSkChlMzcqtycTQoaJRLuHDPpomTr+37JYlCgaZwwCWELfnfuh IW/QmqNeTHtWqU6xHa1SH3+s6IO3wOK0i/DYfXkK6a4UkNiftu/p63l7IfiwFYiqeOD5 ESmw== X-Gm-Message-State: AGi0Pub9FdcIp+VVEvrZZ/zsrQBxP/0bq3u6deQEqMnheBwhUkTQfCk+ KbJICHSYrNwzj/O3PN4xrwdrRSzE3wh42my/eHaoYUqX8tV1Neu5qur3u4BEgREaFvjRZiU/hRc eo+BnzrAWcTsL8hdXpZmyrp/hTURVYFtkBazx5LldbyptyZfIYTCdd+/E3e3Q4cwoLAcgEhpsVV zv6mRU1TXTLeuktlP0OJIqEl3JG1IqnOB3Tdy746O7/wXN8vofgANOuQMh3kgcEfMm8OE= X-Google-Smtp-Source: APiQypKujJTz1YOaPL/u3jNEmsnUAuPEnMQbs1M/dzO+3YBOMl55JzEW9gEMVtsVZn0Luj5pbo9UQaT/1ZjFnRE36Fo= X-Received: by 2002:a19:ed14:: with SMTP id y20mr6903280lfy.179.1585539365198; Sun, 29 Mar 2020 20:36:05 -0700 (PDT) MIME-Version: 1.0 References: <376C920F3015BC43A3485A86670B336C2E1884A3@TW-MBX-P03.cnesnet.ad.cnes.fr> <376C920F3015BC43A3485A86670B336C2E188641@TW-MBX-P03.cnesnet.ad.cnes.fr> In-Reply-To: <376C920F3015BC43A3485A86670B336C2E188641@TW-MBX-P03.cnesnet.ad.cnes.fr> From: Khushboo Vashi Date: Mon, 30 Mar 2020 09:05:58 +0530 Message-ID: Subject: Re: disable create server To: Pavy Manuel Cc: Ashesh Vashi , Dave Page , "pgadmin-hackers@lists.postgresql.org" Content-Type: multipart/alternative; boundary="000000000000a3f28705a20a26c9" X-CLOUD-SEC-AV-Info: edb,google_mail,monitor X-CLOUD-SEC-AV-Sent: true X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --000000000000a3f28705a20a26c9 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, On Fri, Mar 27, 2020 at 6:11 PM Pavy Manuel wrote: > > > Thank you all. > > > > I try to deploy pgadmin4 on my company but I want to manage the > connections (server in pgadmin) the users can create. > So, I've found the line 84 of > pgadmin/dashboard/templates/dashboard/welcome_dashboard.html to disable t= he > link : > > > pgAdmin saves server list per user. > > You may need to keep that in mind. > > > > Yes I=E2=80=99m aware of that > > > > > > It seems like a reasonable request to me - for example, to stop students > adding random servers to a shared instance of pgAdmin that they're only > supposed to be using for coursework. > > Agreed. > > > > My need is different : I deploy pgadmin4 in an ansible role which deploy > the following (inside the [ ] ) : > > User ----> [ Apache ---> pgadmin ----> pgbouncer ] -----> postgresql > backend > > And I have a script for adding a server for a specific user which create = a > pool and add the server tuple in the sqlite3 db. > > The benefit is : > > - I can serialize the connections (some users open many, many tabs) > > - users who do not close their connections are not a problem (thanks to > the pgbouncer timeout) > > - I can reserve some connection to the production chain > > - I can monitor the pool > > > > Since yesterday, I=E2=80=99ve found a (ugly) solution : in the > ./pgadmin/static/js/generated/browser_nodes.js, I deactivate the Server > action. > > > > But the pretty way should be to create a dedicated profile (in addition o= f > administrator and user). > Please create a feature request @ https://redmine.postgresql.org/projects/pgadmin4 . Thanks, Khushboo > > > Manuel Pavy > --000000000000a3f28705a20a26c9 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi,

=C2=A0

Thank you all.

=C2=A0

I= try to deploy pgadmin4 on my company but I want to manage the connections = (server in pgadmin) the users can create.
So, I've found the line 84 of pgadmin/dashboard/templates/dashboard/wel= come_dashboard.html to disable the link :
<a href=3D"#" onclick=3D"pgAdmin.Dashboard.add_new_server= ()">

p= gAdmin saves server list per user.

Y= ou may need to keep that in mind.=C2=A0

=C2=A0

Yes I=E2=80=99m aware of that

=C2=A0

=C2=A0

I= t seems like a reasonable request to me - for example, to stop students add= ing random servers to a shared instance of pgAdmin that they're only su= pposed to be using for coursework.

A= greed.

=C2=A0

My need is different=C2=A0: I d= eploy pgadmin4 in an ansible role which deploy the following (inside the [ = ] ) :

User=C2=A0 ---->=C2=A0 [ Apa= che --->=C2=A0 pgadmin ----> pgbouncer ] =C2=A0-----> =C2=A0postgr= esql backend

And I have a script for adding = a server for a specific user which create a pool and add the server tuple i= n the sqlite3 db.

The benefit is :<= /span>

- I can serialize the connectio= ns (some users open many, many tabs)

- users who do not close their = connections are not a problem (thanks to the pgbouncer timeout)

- I can reserve some connection= to the production chain

- I can monitor the pool=

=C2=A0

Since yesterday, I=E2=80=99ve f= ound a (ugly) solution : in the ./pgadmin/static/js/generated/browser_nodes= .js, I deactivate the Server action.

=C2=A0

But the pretty way should be to= create a dedicated profile (in addition of administrator and user).=

Please create a feature= request=C2=A0@=C2=A0https://redmine.postgresql.org/projects/pgadmin4=C2=A0.

Thanks,
Khushboo=C2=A0

=C2=A0

Manuel Pavy

--000000000000a3f28705a20a26c9--