Bug 46675 - PostgreSQL: permissions granted via group ignored.
Summary: PostgreSQL: permissions granted via group ignored.
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
3.5.1 RC1
Hardware: Other All
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:3.5.1 target:3.6.0
Keywords: regression
Depends on:
Blocks:
 
Reported: 2012-02-27 04:00 UTC by Lionel Elie Mamane
Modified: 2012-02-29 03:57 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
test case - client side (9.14 KB, application/vnd.oasis.opendocument.database)
2012-02-27 04:00 UTC, Lionel Elie Mamane
Details
test case - server side (sql dump) (1.57 KB, text/plain)
2012-02-27 04:03 UTC, Lionel Elie Mamane
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lionel Elie Mamane 2012-02-27 04:00:59 UTC
Created attachment 57709 [details]
test case - client side

Regression wrt to 3.5.0.

When PostgreSQL user A is member of group B, and group B has privileges on table T, LibreOffice 3.5.1 ignores these privileges. As a consequence, for example it keeps the user connected as PostgreSQL-user A from editing data in table T, although group B (and thus indirectly A) has the privilege to do it.

psql -Upostgres:
# CREATE ROLE master WITH LOGIN;
# CREATE ROLE tst WITH LOGIN PASSWORD 'foo' IN ROLE editors;
Load attached database dump in a PostgreSQL server (version 8.4 or later).


psql -Ujohn
> INSERT INTO dbtable VALUES (5, 4, 2, TRUE);
INSERT 0 1
(that is, success)
> UPDATE dbtable SET field4=FALSE WHERE field1=5;
UPDATE 1
(again, success)


Open attached .odb file. Correct hostname and/or dbname in menu edit / database / properties. Open form "dbtable". Cannot edit/insert data: all controls greyed out or locked.

With LibreOffice 3.5.0, can edit/insert data.
Comment 1 Lionel Elie Mamane 2012-02-27 04:03:55 UTC
Created attachment 57710 [details]
test case - server side (sql dump)
Comment 2 Not Assigned 2012-02-27 04:17:25 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ee0cb9d05d11c23421ec5ddddd7b268eb8c5e049

fdo#46675: expand group memberships in get*Privileges
Comment 3 Not Assigned 2012-02-27 04:52:12 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fdd70e63eee34e762f5e4c2568affd35b6bc68af

fdo#46675: fixup
Comment 4 Not Assigned 2012-02-27 05:20:54 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d511742cf33aa5a27d23fe7c4a7f956200d03321&g=libreoffice-3-5

fdo#46675: expand group memberships in PostgreSQL-SDBC get*Privileges


It will be available in LibreOffice 3.5.2.
Comment 5 Not Assigned 2012-02-29 03:38:21 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-3-5-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=01dadc1753da47664eab338f41aa3e3b0f5b5cfb&g=libreoffice-3-5-1

fdo#46675: expand group memberships in PostgreSQL-SDBC get*Privileges


It will be available already in LibreOffice 3.5.1.