-
Notifications
You must be signed in to change notification settings - Fork 3
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
bug: APIS_DETAIL_VIEWS_ALLOWED = True
does not make any difference
#1400
Comments
Skip adding permissions to DetailView if APIS_DETAIL_VIEWS_ALLOWED is set by using a DetailViewObjectMixin that overrides GenericModelMixin's get_permission_required method. fixes #1400
I think we don't need this setting anymore.
At least in one project I worked on, the users did not want to make all entities public, but only some of them - which would not work with only one setting. Back then I introduced the |
Oh yes, that makes sense - but what I meant here was having two different settings for list views ( I am guessing In TibSchol I am implementing custom managers for different access tiers, but I'll check if I can use the |
Ah, yes, you're totally right! The split is a remnant of old apis and both those settings are simple booleans, so there is no filtering possible with them.
Yes, please do! I'm still not sure if its a good approach, because the function can get very complex |
Despite the setting
APIS_DETAIL_VIEWS_ALLOWED = True
the user is still forced to login to see the detail page.And as far as I can tell this ensures that view permissions are always set for Detail views.
apis-core-rdf/apis_core/generic/views.py
Line 87 in 4798c98
A fix is available in PR #1399
To Discuss:
I would like to suggest that we use a single setting to view entities that when set would allow the anonymous user read only access to both list and detail views. Does that make sense?
The text was updated successfully, but these errors were encountered: