File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 11import logging
22import waffle
3+ from waffle import get_waffle_flag_model
34
45from django .http .response import HttpResponseBadRequest
56from django .template .response import TemplateResponse
@@ -107,13 +108,14 @@ def sensitive_info_check(self, request):
107108
108109 # TODO: Clean up use of the require-scopes feature flag and multiple templates, when no longer required.
109110 def get_template_names (self ):
111+ flag = get_waffle_flag_model ().get ("limit_data_access" )
110112 if waffle .switch_is_active ('require-scopes' ):
111- if waffle . switch_is_active ( 'new_auth' ):
113+ if flag . id is not None and flag . is_active_for_user ( self . application . user ):
112114 return ["design_system/new_authorize_v2.html" ]
113115 else :
114116 return ["design_system/authorize_v2.html" ]
115117 else :
116- if waffle . switch_is_active ( 'new_auth' ):
118+ if flag . id is not None and flag . is_active_for_user ( self . user ):
117119 return ["design_system/new_authorize_v2.html" ]
118120 else :
119121 return ["design_system/authorize.html" ]
You can’t perform that action at this time.
0 commit comments