Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: acdh-oeaw/apis-core-rdf
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2f970ef5bb9a4cc421eba2799b02b906c49c3c16
Choose a base ref
..
head repository: acdh-oeaw/apis-core-rdf
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e2a2770009724572bfd835bad8017386d9cc97d6
Choose a head ref
Showing with 3 additions and 2 deletions.
  1. +3 −2 apis_core/generic/views.py
5 changes: 3 additions & 2 deletions apis_core/generic/views.py
Original file line number Diff line number Diff line change
@@ -87,9 +87,10 @@ def get_template_names(self):
return template_names

def get_permission_required(self):
if getattr(settings, "APIS_ANON_VIEWS_ALLOWED", False):
if getattr(self, "permission_action_required", None) == "view" and getattr(
settings, "APIS_ANON_VIEWS_ALLOWED", False
):
return []

if hasattr(self, "permission_action_required"):
return [permission_fullname(self.permission_action_required, self.model)]
return []