idp_oidc: add api access and profile management to BO config (#71820)
This commit is contained in:
parent
0c5da1c832
commit
9141583b58
|
@ -38,6 +38,8 @@ class OIDCClientForm(SlugMixin, forms.ModelForm):
|
|||
'authorization_mode',
|
||||
'authorization_flow',
|
||||
'home_url',
|
||||
'has_api_access',
|
||||
'activate_user_profiles',
|
||||
'colour',
|
||||
'logo',
|
||||
]
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue