Commit 83d2ff0
committed
feat(authorization): unregister RBAC API endpoints in OS — moved to Pro
Strip the 8 RBAC v2_api.register() calls from dojo/urls.py
(dojo_groups, dojo_group_members, global_roles, product_groups,
product_members, product_type_groups, product_type_members, roles) and
the 4 alias registrations (asset_groups, asset_members,
organization_groups, organization_members) from
dojo/asset/api/urls.py and dojo/organization/api/urls.py. The viewsets
and serializers in dojo/api_v2/{views,serializers}.py stay so Pro can
keep subclassing them.
Pro already registers replacements for dojo_groups, dojo_group_members,
global_roles, product_groups, product_members, product_type_groups,
product_type_members via its add_*_urls hooks; companion Pro commit
adds add_roles_urls so /api/v2/roles/ stays available under Pro.
Delete the 12 RBAC test classes from unittests/test_rest_framework.py
(DojoGroupsTest, DojoGroupsUsersTest, RolesTest, GlobalRolesTest,
ProductTypeMemberTest, OrganizationMemberTest, ProductMemberTest,
AssetMemberTest, ProductTypeGroupTest, OrganiazationGroupTest,
ProductGroupTest, AssetGroupTest) — equivalent coverage exists in
dojo-pro at unit_tests/api/{dojo_groups,dojo_group_members,
global_roles,product_groups,product_members,product_type_groups,
product_type_members}/{test_crud,test_permissions}.py, and the
companion Pro commit adds unit_tests/api/roles/test_crud.py for the
roles endpoint.1 parent 4b1306c commit 83d2ff0
4 files changed
Lines changed: 13 additions & 362 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
| |||
10 | 8 | | |
11 | 9 | | |
12 | 10 | | |
13 | | - | |
14 | | - | |
| 11 | + | |
| 12 | + | |
15 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
3 | | - | |
4 | 2 | | |
5 | 3 | | |
6 | 4 | | |
7 | 5 | | |
8 | 6 | | |
9 | 7 | | |
10 | | - | |
11 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
12 | 11 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | 23 | | |
26 | 24 | | |
27 | 25 | | |
| |||
30 | 28 | | |
31 | 29 | | |
32 | 30 | | |
33 | | - | |
34 | 31 | | |
35 | 32 | | |
36 | 33 | | |
| |||
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | 44 | | |
52 | 45 | | |
53 | 46 | | |
| |||
58 | 51 | | |
59 | 52 | | |
60 | 53 | | |
61 | | - | |
62 | 54 | | |
63 | 55 | | |
64 | 56 | | |
| |||
131 | 123 | | |
132 | 124 | | |
133 | 125 | | |
134 | | - | |
135 | | - | |
| 126 | + | |
| 127 | + | |
136 | 128 | | |
137 | 129 | | |
138 | 130 | | |
139 | 131 | | |
140 | 132 | | |
141 | | - | |
| 133 | + | |
142 | 134 | | |
143 | 135 | | |
144 | 136 | | |
| |||
156 | 148 | | |
157 | 149 | | |
158 | 150 | | |
159 | | - | |
160 | | - | |
| 151 | + | |
| 152 | + | |
161 | 153 | | |
162 | | - | |
163 | | - | |
| 154 | + | |
| 155 | + | |
164 | 156 | | |
165 | 157 | | |
166 | 158 | | |
167 | 159 | | |
168 | | - | |
| 160 | + | |
169 | 161 | | |
170 | 162 | | |
171 | 163 | | |
| |||
0 commit comments