mirror of
https://github.com/ansible/awx.git
synced 2024-11-01 08:21:15 +03:00
include password when creating new user
This commit is contained in:
parent
338a504314
commit
81d14bdde3
@ -286,7 +286,7 @@ class OrganizationsTest(BaseTest):
|
||||
self.assertEqual(users['count'], 2)
|
||||
|
||||
# post a completely new user to verify we can add users to the subcollection directly
|
||||
new_user = dict(username='NewUser9000')
|
||||
new_user = dict(username='NewUser9000', password='NewPassword9000')
|
||||
which_org = self.normal_django_user.admin_of_organizations.all()[0]
|
||||
url = reverse('api:organization_users_list', args=(which_org.pk,))
|
||||
self.post(url, new_user, expect=201, auth=self.get_normal_credentials())
|
||||
|
@ -419,11 +419,11 @@ class ProjectsTest(BaseTransactionTest):
|
||||
self.post(team_users, data=dict(x, is_superuser=False),
|
||||
expect=204, auth=self.get_normal_credentials())
|
||||
# The normal admin user can't create a super user vicariously through the team/project
|
||||
self.post(team_users, data=dict(username='attempted_superuser_create', is_superuser=True),
|
||||
expect=403, auth=self.get_normal_credentials())
|
||||
self.post(team_users, data=dict(username='attempted_superuser_create', password='thepassword',
|
||||
is_superuser=True), expect=403, auth=self.get_normal_credentials())
|
||||
# ... but a superuser can
|
||||
self.post(team_users, data=dict(username='attempted_superuser_create', is_superuser=True),
|
||||
expect=201, auth=self.get_super_credentials())
|
||||
self.post(team_users, data=dict(username='attempted_superuser_create', password='thepassword',
|
||||
is_superuser=True), expect=201, auth=self.get_super_credentials())
|
||||
|
||||
self.assertEqual(Team.objects.get(pk=team.pk).users.count(), 5)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user