Mercurial > ~dholland > hg > swallowtail > index.cgi
comparison database/schema/messages.sql @ 55:40f64a96481f
Adjust database user arrangements and grant schema privs.
author | David A. Holland |
---|---|
date | Sun, 10 Apr 2022 19:36:29 -0400 |
parents | 36d91dfe017f |
children |
comparison
equal
deleted
inserted
replaced
54:36d91dfe017f | 55:40f64a96481f |
---|---|
51 | 51 |
52 -- Create indexes for number_in_pr and number_in_msg both to enforce | 52 -- Create indexes for number_in_pr and number_in_msg both to enforce |
53 -- uniqueness and to enable lookup. | 53 -- uniqueness and to enable lookup. |
54 CREATE UNIQUE INDEX ON messages (pr, number_in_pr); | 54 CREATE UNIQUE INDEX ON messages (pr, number_in_pr); |
55 CREATE UNIQUE INDEX ON attachments (msgid, number_in_msg); | 55 CREATE UNIQUE INDEX ON attachments (msgid, number_in_msg); |
56 | |
57 -- The raw mail queue is append-only except to admins. | |
58 GRANT SELECT, INSERT, UPDATE, DELETE ON rawmail TO swallowtail_admin; | |
59 GRANT INSERT ON rawmail TO swallowtail_writer; | |
60 | |
61 -- Messages and attachments are generically accessible, but we don't | |
62 -- allow ordinary writers to modify them. (XXX: is that silly?) | |
63 GRANT SELECT, INSERT, UPDATE, DELETE ON messages TO swallowtail_admin; | |
64 GRANT SELECT, INSERT, UPDATE, DELETE ON attachments TO swallowtail_admin; | |
65 GRANT SELECT, INSERT ON messages TO swallowtail_writer; | |
66 GRANT SELECT, INSERT ON attachments TO swallowtail_writer; | |
67 GRANT SELECT ON messages, attachments TO swallowtail_reader; | |
68 GRANT SELECT ON messages, attachments TO swallowtail_public; |