com.atlassian.confluence
Class PagePermissionsAcceptanceTest

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.AbstractPermissionsAcceptanceTest
                      extended by com.atlassian.confluence.PagePermissionsAcceptanceTest
All Implemented Interfaces:
junit.framework.Test

public class PagePermissionsAcceptanceTest
extends AbstractPermissionsAcceptanceTest

Some (or all) of the LDAP skips may not be necessary.


Field Summary
static java.lang.String NO_EDIT_PERMS_MESSAGE
           
 
Fields inherited from class com.atlassian.confluence.AbstractPermissionsAcceptanceTest
ADMIN_GROUP_PERMISSION
 
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
PagePermissionsAcceptanceTest()
           
 
Method Summary
protected  void loginAdmin(java.lang.String startPage)
           
protected  void setUp()
          Default setUp method.
 void testAdminCannotEditRestrictedForEditingPage()
           
 void testAdminCannotEditRestrictedForViewingPage()
           
 void testAdminCannotEditRestrictedPage()
           
 void testAnonymousUsersRespectPageLevelEditPermissions()
           
 void testCannotEditPageWithoutViewPermission()
           
 void testChildrenSectionOnViewPageRespectsPageLevelPermissions()
           
 void testCommentOnRestrictedSubPageSameFlush()
          Make sure added comments receive same inherited permissions.
 void testCommentOnRestrictedSubPageSeparateFlush()
          Make sure added comments receive same inherited permissions.
 void testCommentOnRestrictedSubPageSeparateFlushAfterEdit()
          Make sure added comments receive same inherited permissions.
 void testCommentOnRestrictedSubPageSeparateFlushBeforeEdit()
          Make sure added comments receive same inherited permissions.
 void testExportWordLink()
           
 void testExportWordLinkAsAdmin()
           
 void testExportWordLinkAsAnonymousUser()
           
 void testGroupEditPermission()
           
 void testGroupViewPermission()
           
 void testMenuOptionsUnavailableForRestrictedPage()
           
 void testPageMetadataNotUpdatedByEditingPermissions()
           
 void testPagePermissionsArePreservedOnMove()
           
 void testPagingOnRestrictedPages()
           
 void testPermissionsForGroupsWithApostrophes()
           
 void testPermissionsForUsersWithApostrophes()
           
 void testPermissionsReflectAddMenuDisplay()
           
 void testRemoveGroup()
           
 void testRemoveUser()
           
 void testRestrictedHomePageAppearsOnList()
           
 void testRestrictionsButtonAppearsOnCreate()
           
 void testRestrictionsButtonAppearsOnEdit()
           
 void testRestrictionsButtonDoesNotAppearWithoutPermissionsOnCreate()
           
 void testSettingGroupPermissionWithNonAsciiCharacters()
           
 void testSpaceAdminCanRemoveRestrictions()
          Test for CONF-8135.
 void testSpaceAdministratorCannotSeeProtectedPage()
           
 void testSuperuserCanEditCommentsOnRestrictedPage()
           
 void testSuperUserCanSeeButNotFindProtectedPage()
           
 void testSuperuserCanSeeRestrictionIconWhenViewingRestrictedPage()
           
 void testSystemAdministratorCannotSeeProtectedPage()
           
 void testUpdatePagePermissionsDoesNotChangeLastModifier()
           
 void testUserCannotRestrictThemselvesFromEditingPage()
           
 void testUserCannotRestrictThemselvesFromViewingPage()
           
 void testUserEditPermission()
           
 void testUserViewPermission()
           
 void testViewPageButtonNotRenderedWhenPageIsRestricted()
           
 void testViewPageSourceRestrictions()
           
 void testViewPermissionsProhibitEdit()
           
 
Methods inherited from class com.atlassian.confluence.AbstractPermissionsAcceptanceTest
assertUserHasNoPermissionsInViewPermissionsTable, removeViewPermissions
 
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, tearDown, 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
 

Field Detail

NO_EDIT_PERMS_MESSAGE

public static final java.lang.String NO_EDIT_PERMS_MESSAGE
See Also:
Constant Field Values
Constructor Detail

PagePermissionsAcceptanceTest

public PagePermissionsAcceptanceTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Description copied from class: AbstractConfluenceAcceptanceTest
Default setUp method. Establishes XML-RPC connection and sets the base URL. Also configures LDAP repository.

Overrides:
setUp in class AbstractConfluenceAcceptanceTest
Throws:
java.lang.Exception - from super

testRestrictionsButtonAppearsOnCreate

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

testRestrictionsButtonAppearsOnEdit

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

testRestrictionsButtonDoesNotAppearWithoutPermissionsOnCreate

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

testUserEditPermission

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

testGroupEditPermission

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

testUserViewPermission

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

testGroupViewPermission

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

testRemoveUser

public void testRemoveUser()
                    throws java.io.IOException,
                           org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testRemoveGroup

public void testRemoveGroup()
                     throws java.io.IOException,
                            org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testPermissionsForUsersWithApostrophes

public void testPermissionsForUsersWithApostrophes()

testPermissionsForGroupsWithApostrophes

public void testPermissionsForGroupsWithApostrophes()

testChildrenSectionOnViewPageRespectsPageLevelPermissions

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

testAnonymousUsersRespectPageLevelEditPermissions

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

testPagePermissionsArePreservedOnMove

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

testExportWordLink

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

testExportWordLinkAsAdmin

public void testExportWordLinkAsAdmin()
                               throws java.io.IOException,
                                      org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testExportWordLinkAsAnonymousUser

public void testExportWordLinkAsAnonymousUser()
                                       throws java.io.IOException,
                                              org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testViewPermissionsProhibitEdit

public void testViewPermissionsProhibitEdit()
                                     throws java.io.IOException,
                                            org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testRestrictedHomePageAppearsOnList

public void testRestrictedHomePageAppearsOnList()
                                         throws java.io.IOException,
                                                org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testUpdatePagePermissionsDoesNotChangeLastModifier

public void testUpdatePagePermissionsDoesNotChangeLastModifier()
                                                        throws java.io.IOException,
                                                               org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testPageMetadataNotUpdatedByEditingPermissions

public void testPageMetadataNotUpdatedByEditingPermissions()
                                                    throws java.io.IOException,
                                                           org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testMenuOptionsUnavailableForRestrictedPage

public void testMenuOptionsUnavailableForRestrictedPage()

testCannotEditPageWithoutViewPermission

public void testCannotEditPageWithoutViewPermission()
                                             throws java.io.IOException,
                                                    org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testAdminCannotEditRestrictedForEditingPage

public void testAdminCannotEditRestrictedForEditingPage()

testAdminCannotEditRestrictedForViewingPage

public void testAdminCannotEditRestrictedForViewingPage()

testSettingGroupPermissionWithNonAsciiCharacters

public void testSettingGroupPermissionWithNonAsciiCharacters()
                                                      throws java.io.IOException,
                                                             org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testViewPageButtonNotRenderedWhenPageIsRestricted

public void testViewPageButtonNotRenderedWhenPageIsRestricted()

loginAdmin

protected void loginAdmin(java.lang.String startPage)

testCommentOnRestrictedSubPageSeparateFlushAfterEdit

public void testCommentOnRestrictedSubPageSeparateFlushAfterEdit()
                                                          throws java.lang.Exception
Make sure added comments receive same inherited permissions. This form of the test adds the page and comment on separate index flushes. This test edits the sub page and index's this edit in the same flush as the comment add. (add comment after edit page) see: CONF-6505

Throws:
java.lang.Exception - e

testCommentOnRestrictedSubPageSeparateFlushBeforeEdit

public void testCommentOnRestrictedSubPageSeparateFlushBeforeEdit()
                                                           throws java.lang.Exception
Make sure added comments receive same inherited permissions. This form of the test adds the page and comment on separate index flushes. This test edits the sub page and index's this edit in the same flush as the comment add. (add comment after edit page) see: CONF-6505

Throws:
java.lang.Exception - e

testCommentOnRestrictedSubPageSeparateFlush

public void testCommentOnRestrictedSubPageSeparateFlush()
                                                 throws java.lang.Exception
Make sure added comments receive same inherited permissions. This form of the test adds the page and comment on separate index flushes. see: CONF-6505

Throws:
java.lang.Exception - e

testCommentOnRestrictedSubPageSameFlush

public void testCommentOnRestrictedSubPageSameFlush()
                                             throws java.lang.Exception
Make sure added comments receive same inherited permissions. This form of the test adds the page and comment on the same index flushes. see: CONF-6505

Throws:
java.lang.Exception - e

testSpaceAdminCanRemoveRestrictions

public void testSpaceAdminCanRemoveRestrictions()
                                         throws java.io.IOException,
                                                org.apache.xmlrpc.XmlRpcException
Test for CONF-8135. Space admins should be able to remove restrictions in their space.

Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testUserCannotRestrictThemselvesFromViewingPage

public void testUserCannotRestrictThemselvesFromViewingPage()
                                                     throws java.io.IOException,
                                                            org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testUserCannotRestrictThemselvesFromEditingPage

public void testUserCannotRestrictThemselvesFromEditingPage()
                                                     throws java.io.IOException,
                                                            org.apache.xmlrpc.XmlRpcException
Throws:
java.io.IOException
org.apache.xmlrpc.XmlRpcException

testAdminCannotEditRestrictedPage

public void testAdminCannotEditRestrictedPage()

testPermissionsReflectAddMenuDisplay

public void testPermissionsReflectAddMenuDisplay()

testSuperUserCanSeeButNotFindProtectedPage

public void testSuperUserCanSeeButNotFindProtectedPage()

testSystemAdministratorCannotSeeProtectedPage

public void testSystemAdministratorCannotSeeProtectedPage()

testSpaceAdministratorCannotSeeProtectedPage

public void testSpaceAdministratorCannotSeeProtectedPage()

testPagingOnRestrictedPages

public void testPagingOnRestrictedPages()

testViewPageSourceRestrictions

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

testSuperuserCanSeeRestrictionIconWhenViewingRestrictedPage

public void testSuperuserCanSeeRestrictionIconWhenViewingRestrictedPage()

testSuperuserCanEditCommentsOnRestrictedPage

public void testSuperuserCanEditCommentsOnRestrictedPage()


Copyright © 2003-2014 Atlassian. All Rights Reserved.