Bug 160516 - Base must be able to emulate the privileges of the underlying database
Summary: Base must be able to emulate the privileges of the underlying database
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-04 08:39 UTC by prrvchr
Modified: 2024-04-19 03:16 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description prrvchr 2024-04-04 08:39:37 UTC
Description:
I am trying to better integrate the management of rights, users and roles in the new version of jdbcDriverOOo.

In this driver I am able to operate the following databases:
- HsqlDB
- H2
- Derby
- MariaDB (via Connector/J)
- PostgreSQL (via pgJDBC)
- FireBird (via JayBird)
- SQLite (via xerial sqlite-jdbc)

If I discard SQLite which does not know how to manage users and rights, I end up with 6 different databases.

Managing users and roles is possible without too much difficulty since the related SQL commands are fairly standard.

On the other hand, for the management of rights on tables and views, each database offers its own list of privileges.

For the moment I was carrying out a transcription of the rights recognized by Base (see Privileges[1]) to the rights supported by the underlying database.

This implementation cannot be satisfactory; it makes rights management impossible (someone who knows the underlying database well is unable to use it!!!)

Here is what I propose to overcome this limitation:

Base is able to obtain additional information from the underlying driver through the Info property obtained by XDatabaseMetadata.getConnectionInfo()[2]. If in this Info property obtained there is a PrivilegesMapping property, then base displays and manages the privileges related to this property.

This allows you to display the exact number and name (there is still a problem with internationalization) of the privileges of the underlying database, in Base.

This is what I am preparing to integrate into the next version of jdbcDriverOOo in order to offer rights management worthy of the name. I think it would be good if base integrated this into its code.

[1] https://www.openoffice.org/api/docs/common/ref/com/sun/star/sdbcx/Privilege.html
[2] https://www.openoffice.org/api/docs/common/ref/com/sun/star/sdbc/XDatabaseMetaData2.html#getConnectionInfo

Steps to Reproduce:
This is just a request for improvement, everything is said above...

Actual Results:
This is just a request for improvement, everything is said above...

Expected Results:
This is just a request for improvement, everything is said above...


Reproducible: Always


User Profile Reset: No

Additional Info:
This is just a request for improvement, everything is said above...