Skip to content

Commit 467e8e5

Browse files
authored
BB2-2522 Change flag to switch for permissions screen (#1124)
1 parent df64410 commit 467e8e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

apps/dot_ext/views/authorization.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import logging
22
import waffle
3+
from waffle import get_waffle_flag_model
34

45
from django.http.response import HttpResponseBadRequest
56
from 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"]

0 commit comments

Comments
 (0)