fix table permissions on new database

Bug #201166 reported by brettatoms
2
Affects Status Importance Assigned to Milestone
Bauble
Confirmed
High
Unassigned

Bug Description

When a new Bauble database is created the tables are owned by the person creating the tables. This means that if a new user is added then they won't have permission to do any CRUD operations on the tables. We either need to set the table to inherit permissions from the database (if possible) or create a way to change table permissions. This is also a problem with sequences and possibly other database objects.

This happens on Postgres databases. I haven't checked what happens on MySQL.

brettatoms (brettatoms)
Changed in bauble:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
brettatoms (brettatoms) wrote :

For now we could create a command line script that will add a new user with the option of allowing them to write to the database. Something like

bbl_adduser someuser -w postgres://user:pwd@host/database

Probably would be good to just add this to a general admin script. If not a complete admin script then should at least be able to change the users permissions. This could also be the precursor code to a more complete user permissions plugin.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.