]> git.ozlabs.org Git - patchwork/blob - lib/sql/grant-all.postgres.sql
login: Focus the username field on load
[patchwork] / lib / sql / grant-all.postgres.sql
1 BEGIN;
2 -- give necessary permissions to the web server. Becuase the admin is all
3 -- web-based, these need to be quite permissive
4 GRANT SELECT, UPDATE, INSERT, DELETE ON
5         django_session,
6         django_site,
7         django_admin_log,
8         django_content_type,
9         auth_group_permissions,
10         auth_user,
11         auth_user_groups,
12         auth_group,
13         auth_user_user_permissions,
14         auth_permission,
15         patchwork_emailconfirmation,
16         patchwork_state,
17         patchwork_comment,
18         patchwork_person,
19         patchwork_userprofile,
20         patchwork_userprofile_maintainer_projects,
21         patchwork_project,
22         patchwork_bundle,
23         patchwork_bundlepatch,
24         patchwork_patch,
25         patchwork_emailoptout,
26         patchwork_patchchangenotification,
27         patchwork_tag,
28         patchwork_patchtag
29 TO "www-data";
30 GRANT SELECT, UPDATE ON
31         auth_group_id_seq,
32         auth_group_permissions_id_seq,
33         auth_permission_id_seq,
34         auth_user_groups_id_seq,
35         auth_user_id_seq,
36         auth_user_user_permissions_id_seq,
37         django_admin_log_id_seq,
38         django_content_type_id_seq,
39         django_site_id_seq,
40         patchwork_bundle_id_seq,
41         patchwork_bundlepatch_id_seq,
42         patchwork_comment_id_seq,
43         patchwork_patch_id_seq,
44         patchwork_person_id_seq,
45         patchwork_project_id_seq,
46         patchwork_state_id_seq,
47         patchwork_emailconfirmation_id_seq,
48         patchwork_userprofile_id_seq,
49         patchwork_userprofile_maintainer_projects_id_seq,
50         patchwork_tag_id_seq,
51         patchwork_patchtag_id_seq
52 TO "www-data";
53
54 -- allow the mail user (in this case, 'nobody') to add patches
55 GRANT INSERT, SELECT ON
56         patchwork_patch,
57         patchwork_comment,
58         patchwork_person
59 TO "nobody";
60 GRANT INSERT, SELECT, UPDATE, DELETE ON
61         patchwork_patchtag
62 TO "nobody";
63 GRANT SELECT ON
64         patchwork_project,
65         patchwork_state,
66         patchwork_tag
67 TO "nobody";
68 GRANT UPDATE, SELECT ON
69         patchwork_patch_id_seq,
70         patchwork_person_id_seq,
71         patchwork_comment_id_seq,
72         patchwork_patchtag_id_seq
73 TO "nobody";
74
75 COMMIT;
76