diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2023-05-03 11:06:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-03 11:06:41 +0200 |
commit | 8013bc91c86345a948a29290d8cc749cebf91099 (patch) | |
tree | 0461931c8c064a52dc728313ce839edc098bcb31 /build | |
parent | 545de25eec505c42f247acc2aa8f1638a83bb749 (diff) | |
parent | 41fc6787bc89c006def08ef833d7f458eb2af59d (diff) | |
download | nextcloud-server-8013bc91c86345a948a29290d8cc749cebf91099.tar.gz nextcloud-server-8013bc91c86345a948a29290d8cc749cebf91099.zip |
Merge pull request #37385 from nextcloud/bugfix/noid/dont-allow-adding-the-same-email-multiple-times
fix(provisioning_api): Don't allow to configure the same additional e…
Diffstat (limited to 'build')
-rw-r--r-- | build/integration/features/provisioning-v1.feature | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/build/integration/features/provisioning-v1.feature b/build/integration/features/provisioning-v1.feature index d34e1bceb6a..5ba6b7f63dd 100644 --- a/build/integration/features/provisioning-v1.feature +++ b/build/integration/features/provisioning-v1.feature @@ -199,6 +199,28 @@ Feature: provisioning | value | private | Then the OCS status code should be "100" And the HTTP status code should be "200" + And sending "PUT" to "/cloud/users/brand-new-user" with + | key | email | + | value | no-reply@nextcloud.com | + And the OCS status code should be "100" + And the HTTP status code should be "200" + # Duplicating primary address + And sending "PUT" to "/cloud/users/brand-new-user" with + | key | additional_mail | + | value | no-reply@nextcloud.com | + And the OCS status code should be "102" + And the HTTP status code should be "200" + And sending "PUT" to "/cloud/users/brand-new-user" with + | key | additional_mail | + | value | no.reply2@nextcloud.com | + And the OCS status code should be "100" + And the HTTP status code should be "200" + # Duplicating another additional address + And sending "PUT" to "/cloud/users/brand-new-user" with + | key | additional_mail | + | value | no.reply2@nextcloud.com | + And the OCS status code should be "102" + And the HTTP status code should be "200" Then user "brand-new-user" has | id | brand-new-user | | phoneScope | v2-private | @@ -214,21 +236,21 @@ Feature: provisioning And As an "brand-new-user" When sending "PUT" to "/cloud/users/brand-new-user" with | key | additional_mail | - | value | no.reply@nextcloud.com | + | value | no.reply3@nextcloud.com | And the OCS status code should be "100" And the HTTP status code should be "200" And sending "PUT" to "/cloud/users/brand-new-user" with | key | additional_mail | - | value | noreply@nextcloud.com | + | value | noreply4@nextcloud.com | And the OCS status code should be "100" And the HTTP status code should be "200" When sending "PUT" to "/cloud/users/brand-new-user/additional_mailScope" with - | key | no.reply@nextcloud.com | + | key | no.reply3@nextcloud.com | | value | v2-federated | Then the OCS status code should be "100" And the HTTP status code should be "200" When sending "PUT" to "/cloud/users/brand-new-user/additional_mailScope" with - | key | noreply@nextcloud.com | + | key | noreply4@nextcloud.com | | value | v2-published | Then the OCS status code should be "100" And the HTTP status code should be "200" @@ -260,11 +282,11 @@ Feature: provisioning And As an "brand-new-user" When sending "PUT" to "/cloud/users/brand-new-user" with | key | additional_mail | - | value | no.reply@nextcloud.com | + | value | no.reply5@nextcloud.com | And the OCS status code should be "100" And the HTTP status code should be "200" When sending "PUT" to "/cloud/users/brand-new-user/additional_mailScope" with - | key | no.reply@nextcloud.com | + | key | no.reply5@nextcloud.com | | value | invalid | Then the OCS status code should be "102" And the HTTP status code should be "200" @@ -274,23 +296,23 @@ Feature: provisioning And As an "brand-new-user" When sending "PUT" to "/cloud/users/brand-new-user" with | key | additional_mail | - | value | no.reply@nextcloud.com | + | value | no.reply6@nextcloud.com | And the OCS status code should be "100" And the HTTP status code should be "200" And sending "PUT" to "/cloud/users/brand-new-user" with | key | additional_mail | - | value | noreply@nextcloud.com | + | value | noreply7@nextcloud.com | And the OCS status code should be "100" And the HTTP status code should be "200" When sending "PUT" to "/cloud/users/brand-new-user/additional_mail" with - | key | no.reply@nextcloud.com | + | key | no.reply6@nextcloud.com | | value | | And the OCS status code should be "100" And the HTTP status code should be "200" Then user "brand-new-user" has - | additional_mail | noreply@nextcloud.com | + | additional_mail | noreply7@nextcloud.com | Then user "brand-new-user" has not - | additional_mail | no.reply@nextcloud.com | + | additional_mail | no.reply6@nextcloud.com | Scenario: An admin cannot edit user account property scopes Given As an "admin" |