sqlalchemy / sqlalchemy/alembic
create op framework for grants?
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 4.4k
- Forks
- 375
- PR merge metrics
- No merged PRs in 30d
Description
Migrated issue, originally created by leo.wandersleb (@giszmo)
I'm struggling with this situation and can't even find others to have this situation, so not sure if I miss something very very obvious:
I use postgres.
user1 may alter the schema
user2 should be able to select/insert/update/delete whatever user1 created
Clearly user1 has to run the alembic script but if it's done as suggested in all tutorials that I find, user2 has no rights whatsoever. I also searched for how to configure my postgres db to grant user2 access to all tables as frankly I guess that it should be handled in the database but I only find people stating you can't which would lead me to assume that alembic should have a feature to grant help with that. The only approach I see is to execute custom SQL with every index and table I create which can be done by alembic but doubles the code in the alembic scripts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Alembic migration scripts and the PostgreSQL privilege behavior described in the issue. Determine the intended scope of a reusable grants framework rather than per-object custom SQL, with completion defined by user2 retaining access to objects created by user1. No file or test is named, so finding the implementation and test boundaries is part of the work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100