pgadmin-org / pgadmin4

pgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.
https://www.pgadmin.org
Other
2.43k stars 638 forks source link

REVOKE privileges do not display in SQL tab for the function (RM #2507) #1227

Closed dpage closed 2 years ago

dpage commented 7 years ago

Issue migrated from Redmine: https://redmine.postgresql.org/issues/2507 Originally created by Murtuza Zabuawala at 2017-06-22 05:53:23 UTC.

Let’s say we have this function:

CREATE OR REPLACE FUNCTION public.test(in_value character varying) RETURNS character varying LANGUAGE 'plpgsql' COST 100.0 VOLATILE LEAKPROOF SECURITY DEFINER AS $$ BEGIN RETURN in_value; END; $$;

ALTER FUNCTION public.test(character varying) OWNER TO user_group_1;

REVOKE ALL PRIVILEGES ON FUNCTION public.test(character varying) FROM public; GRANT EXECUTE ON FUNCTION public.test(character varying) TO user_group_2;

Now let’s see it with pgAdmin 3:

...

GRANT EXECUTE ON FUNCTION public.test(character varying) TO user_group_1; GRANT EXECUTE ON FUNCTION public.test(character varying) TO user_group_2; REVOKE ALL ON FUNCTION public.test(character varying) FROM public;

And now with pgAdmin 4:

...

GRANT EXECUTE ON FUNCTION public.test(character varying) TO user_group_1;

GRANT EXECUTE ON FUNCTION public.test(character varying) TO user_group_2;

Like you can see the revoke of public access is not included in pgAdmin 4 in SQL tab.

It would be nice to have the whole list of privileges changes there. Because for example when I copy the code and execute it on another database, then everyone has access to it!

pgAdmin 4 v1.5 Desktop Runtime Windows 10 x64 1511 PostgreSQL 9.6.3

-- Reported by: mammoth.power@gmx.us

dpage commented 7 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-1 Originally created by Khushboo Vashi at 2017-06-26 06:15:20 UTC.

Redmine ticket header update:

Name Old Value New Value
Status changed New In Progress
Assigned To changed Khushboo Vashi
dpage commented 7 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-2 Originally created by Khushboo Vashi at 2017-06-26 07:26:53 UTC.

Patch submitted.

https://www.postgresql.org/message-id/CAFOhELf0+rjNQbUF9WiZefbCzBXr6XLvgUP5K+kL2FXVdTsRXg@mail.gmail.com

dpage commented 7 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-3 Originally created by Dave Page at 2017-06-26 11:49:47 UTC.

Redmine ticket header update:

Name Old Value New Value
Fixed Version changed 1.6
dpage commented 7 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-4 Originally created by Khushboo Vashi at 2017-06-26 11:50:45 UTC.

Applied in changeset commit:d4e77deda466f460debbe37044d44a0c8ad456fa.

Redmine ticket header update:

Name Old Value New Value
Status changed In Progress In Testing
Done Ratio changed 0 90
dpage commented 7 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-5 Originally created by Fahar Abbas at 2017-07-06 05:04:16 UTC.

RM resolved in latest commit:

commit 9de6c08d28ea04dbd83f7f90a2dbfd4063d1780e

Tested Platform: Ubuntu 16.04 Linux 64

Redmine ticket header update:

Name Old Value New Value
Status changed In Testing Resolved
dpage commented 6 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-6 Originally created by Fahar Abbas at 2018-01-09 05:36:35 UTC.

Redmine ticket header update:

Name Old Value New Value
Done Ratio changed 90 100
dpage commented 5 years ago

Comment migrated from Redmine: https://redmine.postgresql.org/issues/2507#note-7 Originally created by Aditya Toshniwal at 2019-08-06 09:11:09 UTC.

Redmine ticket header update:

Name Old Value New Value
Relationship (relates) changed RM #4567
dpage commented 2 years ago

Issue closed on Redmine.