diff options
author | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-19 11:14:12 +0200 |
---|---|---|
committer | Sébastien Lesaint <sebastien.lesaint@sonarsource.com> | 2016-10-20 17:17:53 +0200 |
commit | a729e675c7fbe66212502068f4f38ea2b74f899d (patch) | |
tree | c12c986a321e6f9efdc30e1865e23e6c44cff65d /it | |
parent | e49f905d8931cf5ee8c5586c8db780bf5f68c531 (diff) | |
download | sonarqube-a729e675c7fbe66212502068f4f38ea2b74f899d.tar.gz sonarqube-a729e675c7fbe66212502068f4f38ea2b74f899d.zip |
SONAR-8100 check user's organization in api/organizations/delete
Diffstat (limited to 'it')
-rw-r--r-- | it/it-tests/src/test/java/it/organization/OrganizationIt.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/it/it-tests/src/test/java/it/organization/OrganizationIt.java b/it/it-tests/src/test/java/it/organization/OrganizationIt.java index e048b7724dc..5187d7a76ae 100644 --- a/it/it-tests/src/test/java/it/organization/OrganizationIt.java +++ b/it/it-tests/src/test/java/it/organization/OrganizationIt.java @@ -128,7 +128,7 @@ public class OrganizationIt { // verify anonymous can't create update nor delete an organization by default verifyAnonymousNotAuthorized(service -> service.create(new CreateWsRequest.Builder().setName("An org").build())); verifyUserNotAuthenticated(service -> service.update(new UpdateWsRequest.Builder().setKey(KEY).setName("new name").build())); - verifyAnonymousNotAuthorized(service -> service.delete(KEY)); + verifyUserNotAuthenticated(service -> service.delete(KEY)); // verify logged in user without any permission can't create update nor delete an organization by default userRule.createUser("john", "doh"); @@ -140,9 +140,9 @@ public class OrganizationIt { // verify anonymous still can't create update nor delete an organization if property is true verifyUserNotAuthenticated(service -> service.create(new CreateWsRequest.Builder().setName("An org").build())); verifyUserNotAuthenticated(service -> service.update(new UpdateWsRequest.Builder().setKey(KEY).setName("new name").build())); - verifyAnonymousNotAuthorized(service -> service.delete(KEY)); + verifyUserNotAuthenticated(service -> service.delete(KEY)); - // verify logged in user without any permission can create nor update nor delete an organization if property is true + // verify logged in user without any permission can't create nor update nor delete an organization if property is true verifyUserNotAuthorized("john", "doh", service -> service.update(new UpdateWsRequest.Builder().setKey(KEY).setName("new name").build())); verifyUserNotAuthorized("john", "doh", service -> service.delete(KEY)); // clean-up |