0001-idp_oidc-deactivate-service-authz-page-according-to-.patch
src/authentic2/views.py | ||
---|---|---|
1302 | 1302 |
return HttpResponseRedirect(reverse('authorized-oauth-services')) |
1303 | 1303 | |
1304 | 1304 | |
1305 |
authorized_oauth_services = AuthorizedOauthServicesView.as_view() |
|
1305 |
authorized_oauth_services = decorators.setting_enabled( |
|
1306 |
'A2_PROFILE_CAN_MANAGE_SERVICE_AUTHORIZATIONS')(AuthorizedOauthServicesView.as_view()) |
tests/test_profile.py | ||
---|---|---|
250 | 250 |
settings.A2_PROFILE_CAN_CHANGE_EMAIL = False |
251 | 251 |
settings.A2_PROFILE_CAN_MANAGE_SERVICE_AUTHORIZATIONS = False |
252 | 252 |
settings.A2_REGISTRATION_CAN_DELETE_ACCOUNT = False |
253 |
# check that service authz page is unknown due to setting deactivation |
|
254 |
url = reverse('authorized-oauth-services') |
|
255 |
response = app.get(url, status=404) |
|
256 |
# only profile edit link is available on main page |
|
253 | 257 |
url = reverse('account_management') |
254 | 258 |
response = app.get(url, status=200) |
255 | 259 |
assert [x['href'] for x in response.html.find('div', {'id': 'a2-profile'}).find_all('a')] == [ |
256 |
- |