@@ -51,20 +51,6 @@ class BaseAPIView(generics.GenericAPIView, PathWalkerMixin):
5151 facet_class = None
5252 total_count = 0
5353
54- def has_no_kwargs (self ):
55- return len (self .kwargs .values ()) == 0
56-
57- def has_owner_scope (self ):
58- kwargs = self .kwargs .keys ()
59- return 'org' in kwargs or 'user' in kwargs
60-
61- def has_concept_container_scope (self ):
62- kwargs = self .kwargs .keys ()
63- return 'source' in kwargs or 'collection' in kwargs
64-
65- def has_parent_scope (self ):
66- return self .has_owner_scope () and self .has_concept_container_scope ()
67-
6854 def _should_exclude_retired_from_search_results (self ):
6955 if self .is_owner_document_model ():
7056 return False
@@ -83,12 +69,8 @@ def is_verbose(self):
8369 def is_brief (self ):
8470 return self .request .query_params .get (BRIEF_PARAM , False ) in ['true' , True ]
8571
86- def verify_scope (self ):
87- pass
88-
8972 def initial (self , request , * args , ** kwargs ):
9073 super ().initial (request , * args , ** kwargs )
91- self .verify_scope ()
9274 self .initialize (request , request .path_info , ** kwargs )
9375
9476 def initialize (self , request , path_info_segment , ** kwargs ): # pylint: disable=unused-argument
@@ -595,15 +577,6 @@ def initial(self, request, *args, **kwargs):
595577 super ().initial (request , * args , ** kwargs )
596578 self .__set_params ()
597579
598- def verify_scope (self ):
599- has_parent_scope = self .has_parent_scope ()
600- has_no_kwargs = self .has_no_kwargs ()
601- if has_no_kwargs :
602- if self .request .method not in ['GET' , 'HEAD' ]:
603- raise Http404 ()
604- elif not has_parent_scope :
605- raise Http404 ()
606-
607580 def get_filter_params (self ):
608581 if self .params :
609582 return self .params
0 commit comments