Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1apWUE-0003Jt-61 for pgadmin-hackers@arkaria.postgresql.org; Mon, 11 Apr 2016 07:42:18 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1apWUD-0005DC-Nr for pgadmin-hackers@arkaria.postgresql.org; Mon, 11 Apr 2016 07:42:17 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1apWUC-0005D3-RQ for pgadmin-hackers@postgresql.org; Mon, 11 Apr 2016 07:42:17 +0000 Received: from mail-wm0-x232.google.com ([2a00:1450:400c:c09::232]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1apWU8-0006DC-A3 for pgadmin-hackers@postgresql.org; Mon, 11 Apr 2016 07:42:16 +0000 Received: by mail-wm0-x232.google.com with SMTP id u206so92072561wme.1 for ; Mon, 11 Apr 2016 00:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=enterprisedb-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=HnAp9ynWH4UCCziY6ttBdvIvtw9PV0MKBbIiIQccODE=; b=zs8E6CmOjWlGLTmA6V0n8NUDZrsjF5OIa0gE2Okas+ft9ejzCPcCS4b7Esd92Bs7Ii 0CJxwbiKiR0kO5RCt8X8vE/CqxSKvR10l7x3op1aKGUrhDbXBdaQWsDYNKaj/msW17jp 157bNzM1Hi4J9f5DoVwuAgZXte6VMwzGmxiZOag3IMduigG/KF0oN6hQ3eGFwkrmASZ+ RHETb3kjlUJfLf43ufYSTMjOk2tZg+qUWhVR/TuuUQHHAiLkWz4EeaPvW1wbp68AKJqK W/YZInJCabDcZE8kyvoUxeR/egFHdtgtbNX1w/LXeykrf7Gjhpg+m3l6FIbVKbsOTWOM cuPA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=HnAp9ynWH4UCCziY6ttBdvIvtw9PV0MKBbIiIQccODE=; b=Qs0PXo1zR7U2ft/5gcP2mqKlIaVfvXYNmHR15VZejcysQkSqbVJQ0ZRxofO5XypvQK BZyjpg+dtZk035OyoYfWuhe55Wd/m2oBBmGddp2aj8qRTxUKwqSrVqTd2YPDshAM63LV oegRJwJKrcTE1hkjfbGb2KxqN1+e8mkOYnwkXzEikv80Fg26/HbZo3zhk+Vd7T3awirD SK1SPrLz2VUlIgZtP8JJAAJg6aOnoYb4+D5PxWliA645SY/IGuD/1w2UmBTcAmQIRQ3h hrDJn1B3AiMsdcqSYFO6vFL8ubRKJb13w5SMI0Nw7OoGlMDgHzcOP7o94ILKp1SU66Nm JSag== X-Gm-Message-State: AD7BkJJ0PyUnLIHtkgKutjOhXJE5tvxWgPwiTFYTxjycQ8pj/tTDLY6AsUe0mqIVafyZK/45yjqMUmyGwOYNL8nz X-Received: by 10.194.201.196 with SMTP id kc4mr21909206wjc.144.1460360530106; Mon, 11 Apr 2016 00:42:10 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.53.133 with HTTP; Mon, 11 Apr 2016 00:41:40 -0700 (PDT) In-Reply-To: References: From: Surinder Kumar Date: Mon, 11 Apr 2016 13:11:40 +0530 Message-ID: Subject: Re: [pgAdmin4][Patch] - Disable PrivilegeControl for nodes visible under catalog To: Dave Page Cc: pgadmin-hackers Content-Type: multipart/mixed; boundary=047d7bb04b4aa4ad58053030ae5b X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgadmin-hackers Precedence: bulk Sender: pgadmin-hackers-owner@postgresql.org --047d7bb04b4aa4ad58053030ae5b Content-Type: multipart/alternative; boundary=047d7bb04b4aa4ad54053030ae59 --047d7bb04b4aa4ad54053030ae59 Content-Type: text/plain; charset=UTF-8 Hi Dave, Please ignore the above patch because instead of disabling fields, now we are hiding the control. As per my conversation with Ashesh, In some cases we need not to show "Group Tab" if its all fields are set to visible = false. For example: In case of view, "privilege info and security labels" need not to show under catalogs. so Its group tab "Security" should also disappear. Please find attached patch and review it. On Thu, Apr 7, 2016 at 3:53 PM, Dave Page wrote: > This time, with the screenshot... > > On Thu, Apr 7, 2016 at 11:14 AM, Dave Page wrote: > > Hi > > > > On Thu, Apr 7, 2016 at 8:45 AM, Surinder Kumar > > wrote: > >> Hi, > >> > >> PFA minor patch for PrivilegeRoleModel > >> > >> Change: Add check to disable PrivilegeRoleModel fields for nodes visible > >> under catalog. > >> > >> Please review the patch. > > > > I'm unclear what this is supposed to do: > > > > - Those fields already seem to be disabled under catalog nodes (though > > - the Add button on subnode grids is still active, but doesn't do > > anything) > > > > - Shouldn't we just hide privilege info on those nodes directly? Why > > break modularity for this? > Yes instead of disabling privilege info, it is better to hide privilege info. I have attached the patch for it. > > > > - I'm seeing weird effects after applying this patch - see the > > attached screenshot. However, that issue remains even after I remove > > it again (and restart the server, and hard-reload). It does seem to > > fix itself eventually, but I'm not sure what causes that. If I try to > > refresh the Functions node, I get: > > > > jquery.contextMenu.js:309 No items specified to show in > > contextMenuhandle.contextmenu @ > > jquery.contextMenu.js:309jQuery.event.dispatch @ > > jquery-1.11.2.js:4665elemData.handle @ jquery-1.11.2.js:4333 > > jquery.contextMenu.js:312 Uncaught Error: No Items > > specifiedhandle.contextmenu @ > > jquery.contextMenu.js:312jQuery.event.dispatch @ > > jquery-1.11.2.js:4665elemData.handle @ jquery-1.11.2.js:4333 > > > I have applied the same patch but functions node under schema and catalogs are working fine. > > -- > > 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 > --047d7bb04b4aa4ad54053030ae59 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Dave,

Please ignore the above patch = because instead of disabling fields, now we are hiding the control.

As per my conversation with As= hesh, In some cases we need not to show "Group Tab" if its all fi= elds are set to visible =3D false.
For example: In case of vi= ew, "privilege info and security labels" need not to show under c= atalogs. so Its group tab "Security" should also disappear.
=

Please find attached patch and review it.

On Thu, Apr 7, 2016 at 3:5= 3 PM, Dave Page <dpage@pgadmin.org> wrote:
This time, with the screenshot...

On Thu, Apr 7, 2016 at 11:14 AM, Dave Page <dpage@pgadmin.org> wrote:
> Hi
>
> On Thu, Apr 7, 2016 at 8:45 AM, Surinder Kumar
> <surinder.kumar@enterprisedb.com> wrote:
>> Hi,
>>
>> PFA minor patch for PrivilegeRoleModel
>>
>> Change: Add check to disable PrivilegeRoleModel fields for nodes v= isible
>> under catalog.
>>
>> Please review the patch.
>
> I'm unclear what this is supposed to do:
>
> - Those fields already seem to be disabled under catalog nodes (though=
> - the Add button on subnode grids is still active, but doesn't do<= br> > anything)
>
> - Shouldn't we just hide privilege info on those nodes directly? W= hy
> break modularity for this?
=C2=A0
Yes instead of disabling privilege info, it is better to hide privil= ege info.
I have attached the patch for it.
=C2=A0
>
> - I'm seeing weird effects after applying this patch - see the
> attached screenshot. However, that issue remains even after I remove > it again (and restart the server, and hard-reload). It does seem to
> fix itself eventually, but I'm not sure what causes that. If I try= to
> refresh the Functions node, I get:
>
> jquery.contextMenu.js:309 No items specified to show in
> contextMenuhandle.contextmenu @
> jquery.contextMenu.js:309jQuery.event.dispatch @
> jquery-1.11.2.js:4665elemData.handle @ jquery-1.11.2.js:4333
> jquery.contextMenu.js:312 Uncaught Error: No Items
> specifiedhandle.contextmenu @
> jquery.contextMenu.js:312jQuery.event.dispatch @
> jquery-1.11.2.js:4665elemData.handle @ jquery-1.11.2.js:4333
>
I have applied the same patch but fun= ctions node under schema and catalogs are working fine.
> --
> 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

--047d7bb04b4aa4ad54053030ae59-- --047d7bb04b4aa4ad58053030ae5b Content-Type: application/octet-stream; name="hide_group_tab.patch" Content-Disposition: attachment; filename="hide_group_tab.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_imvowmd30 ZGlmZiAtLWdpdCBhL3dlYi9wZ2FkbWluL3N0YXRpYy9qcy9iYWNrZm9ybS5w Z2FkbWluLmpzIGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBn YWRtaW4uanMKaW5kZXggZTMwYTI3OC4uMjYzYzZhOSAxMDA2NDQKLS0tIGEv d2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMKKysr IGIvd2ViL3BnYWRtaW4vc3RhdGljL2pzL2JhY2tmb3JtLnBnYWRtaW4uanMK QEAgLTE2MDYsMTMgKzE2MDYsMTggQEAKICAgICAgICAgICAgICAgKF8uaXNV bmRlZmluZWQocy5taW5fdmVyc2lvbikgPyB0cnVlIDoKICAgICAgICAgICAg ICAgIChzZXJ2ZXJfaW5mby52ZXJzaW9uID49IHMubWluX3ZlcnNpb24pKSAm JgogICAgICAgICAgICAgICAoXy5pc1VuZGVmaW5lZChzLm1heF92ZXJzaW9u KSA/IHRydWUgOgotICAgICAgICAgICAgICAgKHNlcnZlcl9pbmZvLnZlcnNp b24gPD0gcy5tYXhfdmVyc2lvbikpKSk7CisgICAgICAgICAgICAgICAoc2Vy dmVyX2luZm8udmVyc2lvbiA8PSBzLm1heF92ZXJzaW9uKSkpKSwKKyAgICAg ICAgICAgICAgdmlzaWJsZSA9IHRydWU7CisKKyAgICAgICAgICBpZiAocy5t b2RlICYmIF8uaXNPYmplY3Qocy5tb2RlKSkKKyAgICAgICAgICAgIHZpc2li bGUgPSAoXy5pbmRleE9mKHMubW9kZSwgbW9kZSkgPiAtMSk7CisgICAgICAg ICAgaWYgKHZpc2libGUpCisgICAgICAgICAgICB2aXNpYmxlID0gZXZhbEFT RnVuYyhzLnZpc2libGUpOworCiAgICAgICAgICAgZ3JvdXBJbmZvW3MuaWRd ID0gewogICAgICAgICAgICAgbGFiZWw6IHMubGFiZWwgfHwgcy5pZCwKICAg ICAgICAgICAgIHZlcnNpb25fY29tcGF0aWJsZTogdmVyX2luX2xpbWl0LAot ICAgICAgICAgICAgdmlzaWJsZTogIXMubW9kZSB8fCAoCi0gICAgICAgICAg ICAgIHMgJiYgcy5tb2RlICYmIF8uaXNPYmplY3Qocy5tb2RlKSAmJgotICAg ICAgICAgICAgICAgIF8uaW5kZXhPZihzLm1vZGUsIG1vZGUpICE9IC0xKSAm JiBldmFsQVNGdW5jKHMudmlzaWJsZSkgfHwgdHJ1ZQorICAgICAgICAgICAg dmlzaWJsZTogdmlzaWJsZQogICAgICAgICAgIH07CiAgICAgICAgICAgcmV0 dXJuOwogICAgICAgICB9CkBAIC0xNzA2LDkgKzE3MTEsMTMgQEAKICAgICAg IC8vIENyZWF0ZSBhbiBhcnJheSBmcm9tIHRoZSBkaWN0aW9uYXJ5IHdpdGgg cHJvcGVyIHJlcXVpcmVkCiAgICAgICAvLyBzdHJ1Y3R1cmUuCiAgICAgICBf LmVhY2goZ3JvdXBzLCBmdW5jdGlvbih2YWwsIGtleSkgewotICAgICAgICBm aWVsZHMucHVzaChfLmV4dGVuZCh7Ci0gICAgICAgICAgbGFiZWw6IGtleSwg ZmllbGRzOiB2YWwKLSAgICAgICAgfSwgKGdyb3VwSW5mb1trZXldIHx8IHt2 ZXJzaW9uX2NvbXBhdGlibGU6IHRydWUsIHZpc2libGU6IHRydWV9KSkpOwor ICAgICAgICBmaWVsZHMucHVzaCgKKyAgICAgICAgICBfLmV4dGVuZCgKKyAg ICAgICAgICAgIF8uZGVmYXVsdHMoCisgICAgICAgICAgICAgIGdyb3VwSW5m b1trZXldIHx8IHtsYWJlbDoga2V5fSwKKyAgICAgICAgICAgICAge3ZlcnNp b25fY29tcGF0aWJsZTogdHJ1ZSwgdmlzaWJsZTogdHJ1ZX0KKyAgICAgICAg ICAgICksIHtmaWVsZHM6IHZhbH0pCisgICAgICAgICAgKTsKICAgICAgIH0p OwogICAgIH0KIAo= --047d7bb04b4aa4ad58053030ae5b Content-Type: text/plain Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 -- Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgadmin-hackers --047d7bb04b4aa4ad58053030ae5b--