diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2020-04-14 13:57:53 +0800 |
---|---|---|
committer | Daniel Axtens <dja@axtens.net> | 2020-04-14 16:15:37 +1000 |
commit | cbc04868c164d2541e01a5de18d568c54f6dcfd1 (patch) | |
tree | f4214ea9bf9f98e9b63ac565d1522294dc2995e2 /lib | |
parent | e15fc9fef64ba8cfd4f5f5c3c74135caef0ebfa7 (diff) | |
download | patchwork-cbc04868c164d2541e01a5de18d568c54f6dcfd1.tar patchwork-cbc04868c164d2541e01a5de18d568c54f6dcfd1.tar.gz |
lib/sql: Update grant script for recent schema changes
This change fixes a few omissions in the grant scripts:
- patchrelation is missing from both mysql and postgres scripts; it's
only needed for web user access.
- event is missing from the web grants on postgres, and the mail grants
on mysql.
Tested on postgres only.
Fixes: 27c2acf56c ("models, templates: Add patch relations")
Fixes: 34e3c9c493 ("sql: Update 'grant-all.mysql' script with missing tables")
Fixes: 234bc7c316 ("lib/sql: fix permissions for v2.0.0 on postgres")
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Daniel Axtens <dja@axtens.net>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/sql/grant-all.mysql.sql | 2 | ||||
-rw-r--r-- | lib/sql/grant-all.postgres.sql | 4 |
2 files changed, 6 insertions, 0 deletions
diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql index 0277077..100cd38 100644 --- a/lib/sql/grant-all.mysql.sql +++ b/lib/sql/grant-all.mysql.sql @@ -23,6 +23,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout TO 'www-data'@loca GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_event TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patch TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchchangenotification TO 'www-data'@localhost; +GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchrelation TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_patchtag TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_person TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_project TO 'www-data'@localhost; @@ -38,6 +39,7 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_userprofile_maintainer_project -- cover letters) and series GRANT INSERT, SELECT ON patchwork_comment TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_coverletter TO 'nobody'@localhost; +GRANT INSERT, SELECT ON patchwork_event TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_patch TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_person TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_series TO 'nobody'@localhost; diff --git a/lib/sql/grant-all.postgres.sql b/lib/sql/grant-all.postgres.sql index 10ec8d2..56a2486 100644 --- a/lib/sql/grant-all.postgres.sql +++ b/lib/sql/grant-all.postgres.sql @@ -21,8 +21,10 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_delegationrule, patchwork_emailconfirmation, patchwork_emailoptout, + patchwork_event, patchwork_patch, patchwork_patchchangenotification, + patchwork_patchrelation, patchwork_patchtag, patchwork_person, patchwork_project, @@ -50,7 +52,9 @@ GRANT SELECT, UPDATE ON patchwork_comment_id_seq, patchwork_delegationrule_id_seq, patchwork_emailconfirmation_id_seq, + patchwork_event_id_seq, patchwork_patch_id_seq, + patchwork_patchrelation_id_seq, patchwork_patchtag_id_seq, patchwork_person_id_seq, patchwork_project_id_seq, |