-
Notifications
You must be signed in to change notification settings - Fork 2
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
Replace usage of is_admin:project
filter in object lists
#49
Comments
Note this is not usable in a listing view yet, where I have used |
I think the I'd say we should implement a ~5s cache on I mentioned something similar on the PR linked at (readthedocs/readthedocs.org#7277 (comment)) |
Mentioned on #128, this approach doesn't quite solve the problem there. I'm not sure a cached admin check is the final solution we want either, but I do agree we should do something other than replace these checks with Ideally:
I'll repurpose this issue to be more clear that perhaps |
is_project_admin
instead of is_admin:project
filteris_admin:project
filter in object lists
Removed assignment for now, it's looking like this needs to be backend change. |
Just noting that this is mostly to resolve: |
I've updated this issue to be more specific. Originally, this was meant as a note from an previous change:
The original change was to update use of
request.user|is_admin:project
with a context variableis_project_admin
-- which is the same call and return value, but cached instead of repeated in the template.However, neither approach is usable when listing multiple projects or similar, where we need the original logic (
request.user|is_admin:project
). We can't use the context variable approach, as this still incurs the same performance issue as doing this in template.We need another option for iterating over a list of objects and using
is_admin
.The text was updated successfully, but these errors were encountered: