Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option for role management per database #120

Open
wants to merge 87 commits into
base: main
Choose a base branch
from

Conversation

cymed
Copy link
Contributor

@cymed cymed commented Jan 31, 2024

General

  • Fix a bug
  • Add a feature
  • Maintenance / sustainability
  • Add Documentation

Describe your changes

TODO : Adapt changes definition as it now provides a structure for database, module and role naming and roles management.

In addition to the generic users tww_viewer, tww_user, tww_manager, tww_sysadmin, this PR creates database-specific pendants for cases such as QGEP/QGEP#840

Screenshots

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • CI Tests are green
  • The documentation is up to date with the proposed change.
  • My work is ready for review

Checklist before merge

  • A review has been performed
  • Comments are resolved
  • Documentation is ready

@3nids
Copy link
Contributor

3nids commented Jan 31, 2024

I would keep this optional as there are good chances that there is only 1 DB instance.

Also, rather than using EXECUTE, I would opt for parameters called from psql, similarly to what we do with SRID.

@cymed

This comment was marked as resolved.

@3nids

This comment was marked as resolved.

@cymed cymed requested a review from sjib February 15, 2024 12:02
@sjib sjib requested a review from ponceta March 4, 2024 19:34
Copy link
Contributor

@sjib sjib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pass this on to @ponceta

@ponceta

This comment was marked as resolved.

@ponceta ponceta added datamodel Concerns the datamodel feature feature regarding issue or new feature request labels Apr 10, 2024
@cymed cymed closed this Apr 15, 2024
@cymed cymed reopened this Apr 15, 2024
@cymed cymed closed this Apr 16, 2024
@cymed cymed reopened this Apr 16, 2024
@cymed cymed added this to the TEKSI Wastewater 2024.0 milestone Apr 17, 2024
@cymed cymed requested review from ponceta and removed request for ponceta April 17, 2024 11:41
@ponceta ponceta added the review Waiting for review label Apr 17, 2024
@ponceta
Copy link
Member

ponceta commented Apr 17, 2024

Are there any adaptations required since we will drop and recreate tww_app schema on a regular basis?

@cymed
Copy link
Contributor Author

cymed commented Apr 17, 2024

Are there any adaptations required since we will drop and recreate tww_app schema on a regular basis?

I will add a script to create_app.py to re-create the grants if the role exists

@cymed
Copy link
Contributor Author

cymed commented Sep 5, 2024

I now added a Plugin menu item to create database roles. It is only active if the admin mode is enabled and checks for superuser rights before doing anything

Edit: Going via the plugin does not work as we can't find the corresponding pg_service without having the database set up

@cymed cymed added the help wanted Extra attention is needed label Sep 5, 2024
@cymed cymed removed the help wanted Extra attention is needed label Sep 5, 2024
@cymed cymed requested review from sjib and ponceta October 2, 2024 13:41
@cymed cymed marked this pull request as ready for review October 2, 2024 13:41
@ponceta ponceta closed this Nov 26, 2024
@ponceta ponceta reopened this Nov 26, 2024
@ponceta ponceta added the TMMT label Nov 26, 2024
@sjib
Copy link
Contributor

sjib commented Dec 19, 2024

@ponceta Is this ready for 2024.0 and can be merged?

@ponceta
Copy link
Member

ponceta commented Dec 20, 2024

This will remove the SQL script with pgAdmin for rights management, I think wait for 2024.1 or 2025.0 is the best way to go. This is strongly linked to TMMT. (Same as #399)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datamodel Concerns the datamodel feature feature regarding issue or new feature request review Waiting for review TMMT
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants