idp_oidc: add api access and profile management to BO config (#71820)

This commit is contained in:
Paul Marillonnet 2022-11-29 11:14:42 +01:00
parent 0c5da1c832
commit 9141583b58
2 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,8 @@ class OIDCClientForm(SlugMixin, forms.ModelForm):
'authorization_mode',
'authorization_flow',
'home_url',
'has_api_access',
'activate_user_profiles',
'colour',
'logo',
]

View File

@ -37,11 +37,15 @@ def test_add_oidc_service(app):
form = resp.form
form['name'] = 'Test'
form['redirect_uris'] = 'http://example.com'
form['has_api_access'] = True
form['activate_user_profiles'] = True
resp = form.submit()
assert OIDCClient.objects.count() == 1
assert OIDCClaim.objects.count() == len(oidc_app_settings.DEFAULT_MAPPINGS)
oidc_client = OIDCClient.objects.get()
assert oidc_client.has_api_access is True
assert oidc_client.activate_user_profiles is True
assert resp.location == f'/manage/services/{oidc_client.pk}/'
resp = resp.follow()
assert "Settings" in resp.text