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

schemas compliance #522

Open
3nids opened this issue Jan 7, 2025 · 5 comments
Open

schemas compliance #522

3nids opened this issue Jan 7, 2025 · 5 comments

Comments

@3nids
Copy link
Contributor

3nids commented Jan 7, 2025

there is a tww_cfg schema which doesn't comply with https://github.com/teksi/Home/wiki/TEKSI-Developer-Guide
I would move the table reach_coefficient_of_friction to tww_sys.

@cymed
Copy link
Contributor

cymed commented Jan 10, 2025

I used the tww_cfg schema in #399. The extension model includes separated last_modification values for cadastre and planning entities, and I needed a switch of sorts for that

@ponceta
Copy link
Member

ponceta commented Jan 13, 2025

I used the tww_cfg schema in #399. The extension model includes separated last_modification values for cadastre and planning entities, and I needed a switch of sorts for that

Who is editing these tables? sys_admin? data_manager ? user?

I think we created tww_cfg for values defined by data_manager but we didn't defined the rights yet.

CREATE SCHEMA IF NOT EXISTS tww_cfg
    AUTHORIZATION postgres;

GRANT ALL ON SCHEMA tww_cfg TO postgres;

GRANT USAGE ON SCHEMA tww_cfg TO tww_viewer;

ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tww_cfg
GRANT SELECT, REFERENCES, TRIGGER ON TABLES TO tww_viewer;

@cymed
Copy link
Contributor

cymed commented Jan 13, 2025

I used the tww_cfg schema in #399. The extension model includes separated last_modification values for cadastre and planning entities, and I needed a switch of sorts for that

Who is editing these tables? sys_admin? data_manager ? user?

I think we created tww_cfg for values defined by data_manager but we didn't defined the rights yet.

CREATE SCHEMA IF NOT EXISTS tww_cfg
    AUTHORIZATION postgres;

GRANT ALL ON SCHEMA tww_cfg TO postgres;

GRANT USAGE ON SCHEMA tww_cfg TO tww_viewer;

ALTER DEFAULT PRIVILEGES FOR ROLE postgres IN SCHEMA tww_cfg
GRANT SELECT, REFERENCES, TRIGGER ON TABLES TO tww_viewer;

In my case, it is tww_user

@3nids
Copy link
Contributor Author

3nids commented Jan 13, 2025

There is indeed some clarifications that need be made, and potentially keep 2 schemas:
tvw_cfg (manager)
tww_sys (admin)

I believe only the baseline table should be put in admin, and all the others in cfg (config, log tables, etc.).

Or we think the distinction admin vs manager is an overkill, we merge the 2.

@cymed
Copy link
Contributor

cymed commented Jan 13, 2025

Manager has the right to alter vl, which is a SysAdmin responsibility because of the implications in INTERLIS export. I would prefer using the manager role for INTERLIS exports (currently at a user level, but as we need CREATE rights for INTERLIS I'd personally limit it to a higher role)

The coefficient of friction config is safe to be altered by user in my opinion, as the AG-xx extension in cfg. They could both be moved to od.

@sjib sjib mentioned this issue Jan 16, 2025
15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants