Added logic to check if user is allowed to see requested data #89 #197

Merged
edraft merged 2 commits from #89 into 1.0.0 2023-02-12 20:35:55 +01:00
Owner

#89

#89
edraft added this to the Sprint 1.0.0 milestone 2023-02-11 12:55:33 +01:00
edraft self-assigned this 2023-02-11 12:55:33 +01:00
edraft added this to the Sprint 1.0.0 project 2023-02-11 12:55:40 +01:00
edraft requested review from Ebola-Chan 2023-02-11 12:55:44 +01:00
edraft force-pushed #89 from 179ea6109d to dd64435c65 2023-02-11 13:12:00 +01:00 Compare
Ebola-Chan approved these changes 2023-02-12 20:27:54 +01:00
@ -35,0 +52,4 @@
if user == "system" or user.auth_role == AuthRoleEnum.admin:
return self._resolve_collection(collection, *args, **kwargs)
for x in collection:
Contributor
for x in collection:
    if not self._can_user_see_element(user, x):
        return List()

Sobald ein Element in der Collection von einem User nicht gesehen werden darf, wird die ganze Collection verworfen?

```python for x in collection: if not self._can_user_see_element(user, x): return List() ``` Sobald ein Element in der Collection von einem User nicht gesehen werden darf, wird die ganze Collection verworfen?
edraft marked this conversation as resolved
edraft added 1 commit 2023-02-12 20:33:31 +01:00
Ebola-Chan approved these changes 2023-02-12 20:35:23 +01:00
edraft merged commit 898e27550e into 1.0.0 2023-02-12 20:35:55 +01:00
edraft deleted branch #89 2023-02-12 20:35:55 +01:00
edraft removed this from the Sprint 1.0.0 milestone 2023-02-13 10:23:32 +01:00
Sign in to join this conversation.
No description provided.