apiclient: use 'access key' label instead of 'password' (#69526)
gitea/authentic/pipeline/head Build started...
Details
gitea/authentic/pipeline/head Build started...
Details
This commit is contained in:
parent
5e184a3453
commit
25a9e733d2
|
@ -921,6 +921,9 @@ class APIClientForm(forms.ModelForm):
|
|||
'apiclient_roles',
|
||||
)
|
||||
field_classes = {'apiclient_roles': ChooseRolesField}
|
||||
labels = {
|
||||
'password': _('Access key'),
|
||||
}
|
||||
|
||||
|
||||
class ServiceForm(forms.ModelForm):
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
<h3>{% trans "Parameters" %}</h3>
|
||||
<ul>
|
||||
<li>{% trans "identifier" %} : {{api_client.identifier}}</li>
|
||||
<li>{% trans "password" %} : {{api_client.password}}</li>
|
||||
<li>{% trans "access key" %} : {{api_client.password}}</li>
|
||||
{% if api_client.restrict_to_anonymised_data %}<li>{% trans "Restricted to anonymised data" %}</li>{% endif %}
|
||||
{% if api_client.apiclient_roles.count %}
|
||||
<li>{% trans "Roles:" %}
|
||||
|
|
|
@ -1390,7 +1390,7 @@ def test_manager_api_client_detail(superuser_or_admin, app):
|
|||
api_client.apiclient_roles.add(role_1, role_2)
|
||||
resp = login(app, superuser_or_admin, api_client.get_absolute_url())
|
||||
assert 'identifier : foo-identifier' in resp.text
|
||||
assert 'password : foo-password' in resp.text
|
||||
assert 'access key : foo-password' in resp.text
|
||||
assert 'foo-description' in resp.text
|
||||
assert 'Restricted to anonymised data' in resp.text
|
||||
assert 'role-1' in resp.text
|
||||
|
|
Loading…
Reference in New Issue