Merge pull request #2675 from kobergj/ForbidEmptyPassword

Forbid empty password
This commit is contained in:
David Christofas
2021-10-27 17:05:48 +02:00
committed by GitHub
4 changed files with 17 additions and 15 deletions
+6 -11
View File
@@ -169,6 +169,8 @@ var formats = []string{"json", "xml"}
var dataPath = createTmpDir()
var defaultPassword = "Testing123"
var defaultUsers = []string{
userEinstein,
userIDP,
@@ -709,6 +711,10 @@ func getService() svc.Service {
}
func createUser(u User) error {
// add default password if not set differently
if u.Password == "" {
u.Password = defaultPassword
}
_, err := sendRequest(
"POST",
userProvisioningEndPoint,
@@ -768,17 +774,6 @@ func TestCreateUser(t *testing.T) {
},
nil,
},
// https://github.com/owncloud/ocis-ocs/issues/50
{
"User without password",
User{
Enabled: "true",
ID: "john",
Email: "john@example.com",
Displayname: "John Dalton",
},
nil,
},
// https://github.com/owncloud/ocis-ocs/issues/49
{
"User with special character in userid",