com.atlassian.confluence
Class LdapReadOnlyAcceptanceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.atlassian.confluence.junit3.JUnit3TimingTestCase
              extended by com.atlassian.confluence.AbstractConfluenceAcceptanceTest
                  extended by com.atlassian.confluence.AbstractLdapAcceptanceTest
                      extended by com.atlassian.confluence.AbstractDefaultPropertiesLdapAcceptanceTest
                          extended by com.atlassian.confluence.LdapReadOnlyAcceptanceTest
All Implemented Interfaces:
junit.framework.Test

public class LdapReadOnlyAcceptanceTest
extends AbstractDefaultPropertiesLdapAcceptanceTest

Tests functionality specific to LDAP read-only mode.


Field Summary
 
Fields inherited from class com.atlassian.confluence.AbstractLdapAcceptanceTest
configurationCallBack, internalDirectory, ldapDirectory, ldapHelper, userDirectories
 
Fields inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
DASHBOARD_RECENT_UPDATES_URL, log, logAdjuster, RANDOM, rpc, TEST_ADMIN, TEST_BLOG, TEST_COMMENT, TEST_GROUP1, TEST_GROUP2, TEST_PAGE, TEST_SPACE, TEST_SPACE2, TEST_USER1, TEST_USER2, TESTBLOG_CONTENT, TESTBLOG_TITLE, testData, TESTPAGE_COMMENT, TESTPAGE_CONTENT, TESTPAGE_TITLE, TESTSPACE_KEY, TESTSPACE_TITLE, TESTSPACE2_KEY, TESTSPACE2_TITLE, webTester, wikiMarkupRpc
 
Constructor Summary
LdapReadOnlyAcceptanceTest()
           
 
Method Summary
 void disabledTestSiteReimportRetainsDirectories()
          Make sure that doing a site reimport retains directory configuration
protected  LdapDirectoryPermission getLdapDirectoryPermission()
          Override to change the permission setting for the LDAP directory.
protected  void onSetUp()
          Override to execute custom set-up code.
protected  void postProcessConfiguration()
          Override to modify the LDAP configuration before it is saved.
 void testAddInternalUserToLdapGroup()
           
 void testAddInternalUserToLdapGroupViaRpc()
           
 void testBatchSync()
          Test batch synchronisation for LDAP read only by adding groups (nested), users, memberships, doing a sync, asserting, removing some of them, asserting again, and then cleaning up afterwards.
 void testCannotAddLdapUserToGroup()
           
 void testCannotAddLdapUserToGroupViaRpc()
           
 void testCannotRemoveLdapGroup()
           
 void testCannotRemoveLdapUserFromLdapGroup()
           
 void testCannotRemoveLdapUserFromLdapGroupViaRpc()
           
 void testCaseOnlyRename()
           
 void testCaseOnlyRenameOfShadowedUser()
           
 void testChangeUserPropertyAndMembershipBetweenSyncs()
          CONF-22410 change a user property + change the same user to be a member of some group in LDAP between syncs
 void testDetectLdapRenames()
           
 void testDisableUser()
          Read-only users should not be disableable
 void testLdapUserCanLogIn()
           
 void testLimitedProfileFieldsEditableForLdapUsers()
           
 void testNoRemoveLinkForLdapUser()
           
 void testPermissionsOnRemovedGroupsAreIgnoredOnPageNoAccess()
           
 void testPermissionsOnRemovedGroupsAreIgnoredOnPageViewAccess()
           
 void testPermissionsOnRemovedGroupsAreIgnoredOnSpaceAdminAccess()
           
 void testPermissionsOnRemovedGroupsAreIgnoredOnSpaceNoAccess()
           
 void testPermissionsOnRemovedUsersAreIgnoredOnPageNoAccess()
           
 void testPermissionsOnRemovedUsersAreIgnoredOnPageViewAccess()
           
 void testPermissionsOnRemovedUsersAreIgnoredOnSpaceAdminAccess()
           
 void testPermissionsOnRemovedUsersAreIgnoredOnSpaceNoAccess()
           
 void testRemoveGroupAddMembersToAnotherGroupBetweenSyncs()
          CONF-22410 delete group (which also affects a user) + add the same user to another group in LDAP between syncs
 void testRenameIsNotAllowedToShadow()
           
 void testRenameReusingDeletedUserUsername()
           
 void testRenameShadowedUser()
           
 void testRenameShadowingUser()
           
 
Methods inherited from class com.atlassian.confluence.AbstractDefaultPropertiesLdapAcceptanceTest
ldapPropertiesFile
 
Methods inherited from class com.atlassian.confluence.AbstractLdapAcceptanceTest
addLdapDirectory, beforeAddLdapDirectory, editLdapDirectory, getLdapProperties, initialiseLdapData, initLdapFromDefaultLdif, onTearDown, setUp, tearDown
 
Methods inherited from class com.atlassian.confluence.AbstractConfluenceAcceptanceTest
adminConsole, attachments, createSpaceViaWebUI, createTestSpaceViaWebUI, directoryConfig, generateBaseUrl, generateFile, getAppContext, getBaseUrl, getConfiguredBaseUrl, getPluginHelper, getServerStateManager, goToBlogCollector, logInAsAdminAtHomepage, loginAsTestUser, loginAsTestUser2, loginAsTestUserAtHomepage, logins, logout, pages, rebuildIndex, setUpTestNG, tearDownTestNG, users, viewHomepage, viewSpaceAdmin, viewSpacePermissions, viewSpaceSummary, viewSpaceTools, viewTrash, watchSpace, webAppContextPath
 
Methods inherited from class com.atlassian.confluence.junit3.JUnit3TimingTestCase
runBare, setExceptionTransformer
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LdapReadOnlyAcceptanceTest

public LdapReadOnlyAcceptanceTest()
Method Detail

onSetUp

protected void onSetUp()
                throws java.lang.Exception
Description copied from class: AbstractLdapAcceptanceTest
Override to execute custom set-up code.

Overrides:
onSetUp in class AbstractLdapAcceptanceTest
Throws:
java.lang.Exception

getLdapDirectoryPermission

protected LdapDirectoryPermission getLdapDirectoryPermission()
Description copied from class: AbstractLdapAcceptanceTest
Override to change the permission setting for the LDAP directory. Default is LdapDirectoryPermission.READ_WRITE.

Overrides:
getLdapDirectoryPermission in class AbstractLdapAcceptanceTest

postProcessConfiguration

protected void postProcessConfiguration()
Description copied from class: AbstractLdapAcceptanceTest
Override to modify the LDAP configuration before it is saved. Use the webTester to set form values, etc.

Overrides:
postProcessConfiguration in class AbstractLdapAcceptanceTest

testLdapUserCanLogIn

public void testLdapUserCanLogIn()
                          throws java.lang.Exception
Throws:
java.lang.Exception

testLimitedProfileFieldsEditableForLdapUsers

public void testLimitedProfileFieldsEditableForLdapUsers()

testCannotAddLdapUserToGroup

public void testCannotAddLdapUserToGroup()
                                  throws java.lang.Exception
Throws:
java.lang.Exception

testCannotAddLdapUserToGroupViaRpc

public void testCannotAddLdapUserToGroupViaRpc()
                                        throws java.lang.Exception
Throws:
java.lang.Exception

testAddInternalUserToLdapGroup

public void testAddInternalUserToLdapGroup()

testAddInternalUserToLdapGroupViaRpc

public void testAddInternalUserToLdapGroupViaRpc()

testCannotRemoveLdapUserFromLdapGroup

public void testCannotRemoveLdapUserFromLdapGroup()
                                           throws java.lang.Exception
Throws:
java.lang.Exception

testCannotRemoveLdapUserFromLdapGroupViaRpc

public void testCannotRemoveLdapUserFromLdapGroupViaRpc()
                                                 throws java.lang.Exception
Throws:
java.lang.Exception

testDisableUser

public void testDisableUser()
Read-only users should not be disableable


testCannotRemoveLdapGroup

public void testCannotRemoveLdapGroup()

testNoRemoveLinkForLdapUser

public void testNoRemoveLinkForLdapUser()

testBatchSync

public void testBatchSync()
Test batch synchronisation for LDAP read only by adding groups (nested), users, memberships, doing a sync, asserting, removing some of them, asserting again, and then cleaning up afterwards.


testChangeUserPropertyAndMembershipBetweenSyncs

public void testChangeUserPropertyAndMembershipBetweenSyncs()
CONF-22410 change a user property + change the same user to be a member of some group in LDAP between syncs


testRemoveGroupAddMembersToAnotherGroupBetweenSyncs

public void testRemoveGroupAddMembersToAnotherGroupBetweenSyncs()
CONF-22410 delete group (which also affects a user) + add the same user to another group in LDAP between syncs


testPermissionsOnRemovedUsersAreIgnoredOnSpaceNoAccess

public void testPermissionsOnRemovedUsersAreIgnoredOnSpaceNoAccess()

testPermissionsOnRemovedUsersAreIgnoredOnSpaceAdminAccess

public void testPermissionsOnRemovedUsersAreIgnoredOnSpaceAdminAccess()

testPermissionsOnRemovedUsersAreIgnoredOnPageNoAccess

public void testPermissionsOnRemovedUsersAreIgnoredOnPageNoAccess()

testPermissionsOnRemovedUsersAreIgnoredOnPageViewAccess

public void testPermissionsOnRemovedUsersAreIgnoredOnPageViewAccess()

testPermissionsOnRemovedGroupsAreIgnoredOnSpaceNoAccess

public void testPermissionsOnRemovedGroupsAreIgnoredOnSpaceNoAccess()

testPermissionsOnRemovedGroupsAreIgnoredOnSpaceAdminAccess

public void testPermissionsOnRemovedGroupsAreIgnoredOnSpaceAdminAccess()

testPermissionsOnRemovedGroupsAreIgnoredOnPageNoAccess

public void testPermissionsOnRemovedGroupsAreIgnoredOnPageNoAccess()

testPermissionsOnRemovedGroupsAreIgnoredOnPageViewAccess

public void testPermissionsOnRemovedGroupsAreIgnoredOnPageViewAccess()

testRenameIsNotAllowedToShadow

public void testRenameIsNotAllowedToShadow()

disabledTestSiteReimportRetainsDirectories

public void disabledTestSiteReimportRetainsDirectories()
                                                throws java.io.IOException,
                                                       java.lang.InterruptedException
Make sure that doing a site reimport retains directory configuration

Throws:
java.io.IOException - if there was an error downloading the export
java.lang.InterruptedException - if the import was interrupted

testRenameShadowingUser

public void testRenameShadowingUser()

testRenameShadowedUser

public void testRenameShadowedUser()

testCaseOnlyRename

public void testCaseOnlyRename()

testCaseOnlyRenameOfShadowedUser

public void testCaseOnlyRenameOfShadowedUser()

testRenameReusingDeletedUserUsername

public void testRenameReusingDeletedUserUsername()

testDetectLdapRenames

public void testDetectLdapRenames()


Copyright © 2003-2014 Atlassian. All Rights Reserved.