Commit cb9c447
Refactor create superadmin mode (#851)
* Basic implementation of admin in user collection in mongodb
* black formatting
* adding codegen files
* minor fix to boolean logic
* Adding get_admin dependency
black formatting
adding codegen file
removing redundant print statement
fixing pytest failure
fixing pytest failure
ran black
* fixed pytest failure
* Adding admin dependency in authorization of dataset,files, metadata, search
* allowing admin to view all datasets
* adding admin in get_roles functions
* adding codegen files
* modifying test
* addressing commnets
* adding the test back
* Admin mode implementation
* removing redundant things
* small fix. the name of the method for file was off so there was an error getting file role
* fix to visualization rendering
* backend change to depends
* codegen
* remove all the adminMode parameter
* fix bug
* black
* admin can be a part of the profile; no need for additional endpoint
* fix drop/enable admin toggle
* simplify admin logic
* rewrite backend
* codegen
* add endpoint to set admin
* fix bug
* pytest, black format and codegen
* wire in the frontend toggle action
* setting is working but other bugs
* fix admin toggle
* add admin mode toggle to every listing page
* fix typo and bug in groups
* only check admin in authorization dependency
* remove unnecessary admin_mode
* codegen/black and remove redandunt admin_mode flag
* fix bug in dataset
* fix search clause
* add more trigger on adminMode
* fix two bugs
* fix bug on error
---------
Co-authored-by: Dipannita Dey <[email protected]>
Co-authored-by: toddn <[email protected]>1 parent a5bc432 commit cb9c447
File tree
43 files changed
+1141
-573
lines changed- backend/app
- deps
- models
- routers
- tests
- frontend/src
- actions
- components
- datasets
- files
- folders
- groups
- listeners
- metadata
- search
- visualizations
- openapi/v2
- models
- services
- reducers
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+1141
-573
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
22 | 27 | | |
23 | 28 | | |
24 | 29 | | |
| |||
32 | 37 | | |
33 | 38 | | |
34 | 39 | | |
| 40 | + | |
| 41 | + | |
35 | 42 | | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
36 | 46 | | |
37 | 47 | | |
38 | 48 | | |
| |||
66 | 76 | | |
67 | 77 | | |
68 | 78 | | |
| 79 | + | |
| 80 | + | |
69 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
70 | 85 | | |
71 | 86 | | |
72 | 87 | | |
| |||
97 | 112 | | |
98 | 113 | | |
99 | 114 | | |
| 115 | + | |
| 116 | + | |
100 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
101 | 121 | | |
102 | 122 | | |
103 | 123 | | |
| |||
148 | 168 | | |
149 | 169 | | |
150 | 170 | | |
| 171 | + | |
151 | 172 | | |
152 | 173 | | |
153 | 174 | | |
154 | 175 | | |
155 | | - | |
156 | | - | |
| 176 | + | |
| 177 | + | |
157 | 178 | | |
158 | 179 | | |
159 | 180 | | |
| |||
204 | 225 | | |
205 | 226 | | |
206 | 227 | | |
| 228 | + | |
207 | 229 | | |
208 | 230 | | |
209 | | - | |
210 | | - | |
| 231 | + | |
| 232 | + | |
211 | 233 | | |
212 | 234 | | |
213 | 235 | | |
| |||
241 | 263 | | |
242 | 264 | | |
243 | 265 | | |
| 266 | + | |
244 | 267 | | |
245 | 268 | | |
246 | | - | |
247 | | - | |
| 269 | + | |
| 270 | + | |
248 | 271 | | |
249 | 272 | | |
250 | 273 | | |
| |||
307 | 330 | | |
308 | 331 | | |
309 | 332 | | |
| 333 | + | |
310 | 334 | | |
311 | 335 | | |
312 | | - | |
313 | | - | |
| 336 | + | |
| 337 | + | |
314 | 338 | | |
315 | 339 | | |
316 | 340 | | |
| |||
377 | 401 | | |
378 | 402 | | |
379 | 403 | | |
380 | | - | |
381 | | - | |
382 | | - | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
383 | 412 | | |
384 | 413 | | |
385 | 414 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
96 | 99 | | |
97 | 100 | | |
98 | 101 | | |
| |||
103 | 106 | | |
104 | 107 | | |
105 | 108 | | |
| 109 | + | |
106 | 110 | | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
110 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
111 | 162 | | |
112 | 163 | | |
113 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
83 | 81 | | |
84 | 82 | | |
85 | 83 | | |
86 | | - | |
| 84 | + | |
87 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
88 | 91 | | |
89 | 92 | | |
90 | 93 | | |
| |||
107 | 110 | | |
108 | 111 | | |
109 | 112 | | |
110 | | - | |
| 113 | + | |
111 | 114 | | |
112 | | - | |
| 115 | + | |
| 116 | + | |
113 | 117 | | |
114 | 118 | | |
115 | 119 | | |
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
120 | 124 | | |
121 | | - | |
| 125 | + | |
| 126 | + | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
| |||
130 | 135 | | |
131 | 136 | | |
132 | 137 | | |
133 | | - | |
134 | 138 | | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | | - | |
| 143 | + | |
143 | 144 | | |
144 | 145 | | |
145 | 146 | | |
146 | 147 | | |
147 | | - | |
148 | 148 | | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | 149 | | |
153 | 150 | | |
154 | 151 | | |
| |||
158 | 155 | | |
159 | 156 | | |
160 | 157 | | |
161 | | - | |
162 | 158 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | 159 | | |
167 | 160 | | |
168 | 161 | | |
| |||
342 | 335 | | |
343 | 336 | | |
344 | 337 | | |
345 | | - | |
| 338 | + | |
346 | 339 | | |
347 | 340 | | |
348 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
212 | 213 | | |
213 | 214 | | |
214 | 215 | | |
| 216 | + | |
215 | 217 | | |
216 | | - | |
| 218 | + | |
217 | 219 | | |
218 | 220 | | |
219 | 221 | | |
| |||
257 | 259 | | |
258 | 260 | | |
259 | 261 | | |
260 | | - | |
261 | 262 | | |
262 | 263 | | |
263 | 264 | | |
| 265 | + | |
264 | 266 | | |
265 | 267 | | |
266 | 268 | | |
| |||
380 | 382 | | |
381 | 383 | | |
382 | 384 | | |
383 | | - | |
384 | 385 | | |
385 | 386 | | |
386 | 387 | | |
| 388 | + | |
387 | 389 | | |
388 | 390 | | |
389 | 391 | | |
| |||
0 commit comments