diff options
author | Stephen Finucane <stephen@that.guru> | 2020-11-28 17:25:25 +0000 |
---|---|---|
committer | Stephen Finucane <stephen@that.guru> | 2020-11-28 17:31:40 +0000 |
commit | 7b967db4e12f9d1af4b3fb3c9f91dc84ecd8160b (patch) | |
tree | f399ec21cf3c3c4f1c68cc1fa6db9c9f0a31911f | |
parent | 70c9db8b9c1bee8ddc32eb1d6fceff6ef616ba3e (diff) | |
download | patchwork-7b967db4e12f9d1af4b3fb3c9f91dc84ecd8160b.tar patchwork-7b967db4e12f9d1af4b3fb3c9f91dc84ecd8160b.tar.gz |
lib: Update DB permissions to reflect model changes
These should have been done when we made changes to the model.
Signed-off-by: Stephen Finucane <stephen@that.guru>
Fixes: ac0e4de9 ("models: Merge 'Patch' and 'Submission'")
-rw-r--r-- | lib/sql/grant-all.mysql.sql | 18 | ||||
-rw-r--r-- | lib/sql/grant-all.postgres.sql | 24 |
2 files changed, 22 insertions, 20 deletions
diff --git a/lib/sql/grant-all.mysql.sql b/lib/sql/grant-all.mysql.sql index 100cd38..98cb455 100644 --- a/lib/sql/grant-all.mysql.sql +++ b/lib/sql/grant-all.mysql.sql @@ -15,14 +15,15 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON django_site TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundlepatch TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_check TO 'www-data'@localhost; -GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_comment TO 'www-data'@localhost; -GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_coverletter TO 'www-data'@localhost; +GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_cover TO 'www-data'@localhost; +GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_covercomment TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_delegationrule TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailconfirmation TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_emailoptout TO 'www-data'@localhost; 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_patchcomment 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; @@ -30,24 +31,23 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_project TO 'www-data'@localhos GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_series TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_seriesreference TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_state TO 'www-data'@localhost; -GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_submission TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_tag TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_userprofile TO 'www-data'@localhost; GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_userprofile_maintainer_projects TO 'www-data'@localhost; --- allow the mail user (in this case, 'nobody') to add submissions (patches, --- cover letters) and series -GRANT INSERT, SELECT ON patchwork_comment TO 'nobody'@localhost; -GRANT INSERT, SELECT ON patchwork_coverletter TO 'nobody'@localhost; +-- allow the mail user (in this case, 'nobody') to add patches +-- cover letters, their respective comments, and series +GRANT INSERT, SELECT ON patchwork_cover TO 'nobody'@localhost; +GRANT INSERT, SELECT ON patchwork_covercomment 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_patchcomment TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_person TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_series TO 'nobody'@localhost; GRANT INSERT, SELECT ON patchwork_seriesreference TO 'nobody'@localhost; -GRANT INSERT, SELECT ON patchwork_submission TO 'nobody'@localhost; GRANT INSERT, SELECT, UPDATE, DELETE ON patchwork_patchtag TO 'nobody'@localhost; GRANT SELECT ON patchwork_delegationrule TO 'nobody'@localhost; -GRANT SELECT ON patchwork_project TO 'nobody'@localhost; +GRANT SELECT ON patchwork_project TO 'nobody'@localhost; GRANT SELECT ON patchwork_state TO 'nobody'@localhost; GRANT SELECT ON patchwork_tag TO 'nobody'@localhost; diff --git a/lib/sql/grant-all.postgres.sql b/lib/sql/grant-all.postgres.sql index 56a2486..a85326e 100644 --- a/lib/sql/grant-all.postgres.sql +++ b/lib/sql/grant-all.postgres.sql @@ -16,14 +16,15 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_bundle, patchwork_bundlepatch, patchwork_check, - patchwork_comment, - patchwork_coverletter, + patchwork_cover, + patchwork_covercomment, patchwork_delegationrule, patchwork_emailconfirmation, patchwork_emailoptout, patchwork_event, patchwork_patch, patchwork_patchchangenotification, + patchwork_patchcomment, patchwork_patchrelation, patchwork_patchtag, patchwork_person, @@ -31,7 +32,6 @@ GRANT SELECT, UPDATE, INSERT, DELETE ON patchwork_series, patchwork_seriesreference, patchwork_state, - patchwork_submission, patchwork_tag, patchwork_userprofile, patchwork_userprofile_maintainer_projects @@ -49,11 +49,13 @@ GRANT SELECT, UPDATE ON patchwork_bundle_id_seq, patchwork_bundlepatch_id_seq, patchwork_check_id_seq, - patchwork_comment_id_seq, + patchwork_cover_id_seq, + patchwork_covercomment_id_seq, patchwork_delegationrule_id_seq, patchwork_emailconfirmation_id_seq, patchwork_event_id_seq, patchwork_patch_id_seq, + patchwork_patchcomment_id_seq, patchwork_patchrelation_id_seq, patchwork_patchtag_id_seq, patchwork_person_id_seq, @@ -66,14 +68,15 @@ GRANT SELECT, UPDATE ON patchwork_userprofile_maintainer_projects_id_seq TO "www-data"; --- allow the mail user (in this case, 'nobody') to add submissions (patches, --- cover letters) and series +-- allow the mail user (in this case, 'nobody') to add patches +-- cover letters, their respective comments, and series GRANT INSERT, SELECT ON - patchwork_comment, - patchwork_coverletter, + patchwork_cover, + patchwork_covercomment, + patchwork_patch, + patchwork_patchcomment, patchwork_event, - patchwork_seriesreference, - patchwork_submission + patchwork_seriesreference TO "nobody"; GRANT INSERT, SELECT, UPDATE, DELETE ON patchwork_patch, @@ -88,7 +91,6 @@ GRANT SELECT ON patchwork_tag TO "nobody"; GRANT UPDATE, SELECT ON - patchwork_comment_id_seq, patchwork_event_id_seq, patchwork_patch_id_seq, patchwork_patchtag_id_seq, |