Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce consistent checks for list and detail views #1412

Open
gythaogg opened this issue Nov 20, 2024 · 0 comments
Open

Enforce consistent checks for list and detail views #1412

gythaogg opened this issue Nov 20, 2024 · 0 comments
Labels
needs-attention This issue or pull request is in need of discussion, information, assessment by team members

Comments

@gythaogg
Copy link
Contributor

gythaogg commented Nov 20, 2024

We can customise which entities the user is allowed to see using the following flags

APIS_LIST_VIEW_OBJECT_FILTER, APIS_VIEW_PASSES_TEST

At the moment the querysets allowed in listviews (APIS_LIST_VIEW_OBJECT_FILTER) and the condition for checking if the detail page is allowed for viewing ( APIS_VIEW_PASSES_TEST) are distinctly separate.

In my opinion, we require only one setting, APIS_LIST_VIEW_OBJECT_FILTER. APIS_VIEW_PASSES_TEST could be dropped and the detail page view permission should be based on whether the entity is in the APIS_LIST_VIEW_OBJECT_FILTER queryset.

Related to #1400

@gythaogg gythaogg added the needs-attention This issue or pull request is in need of discussion, information, assessment by team members label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-attention This issue or pull request is in need of discussion, information, assessment by team members
Projects
None yet
Development

No branches or pull requests

1 participant