Search in sources :

Example 1 with XWikiCachingRightService

use of org.xwiki.security.authorization.internal.XWikiCachingRightService in project xwiki-platform by xwiki.

the class AbstractLegacyWikiTestCase method setUp.

@Before
@Override
public void setUp() throws Exception {
    super.setUp();
    this.legacyImpl = new XWikiRightServiceImpl();
    this.cachingImpl = new XWikiCachingRightService();
}
Also used : XWikiCachingRightService(org.xwiki.security.authorization.internal.XWikiCachingRightService) XWikiRightServiceImpl(com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl) Before(org.junit.Before)

Example 2 with XWikiCachingRightService

use of org.xwiki.security.authorization.internal.XWikiCachingRightService in project xwiki-platform by xwiki.

the class TestLegacyTestWiki method testLegacyWikiBuilding.

@Test
public void testLegacyWikiBuilding() throws Exception {
    LegacyTestWiki testWiki = new LegacyTestWiki(getMockery(), getComponentManager(), "test.xml", true);
    XWikiRightServiceImpl legacyImpl = new XWikiRightServiceImpl();
    testWiki.getXWikiContext().setWikiId("xwiki");
    Assert.assertTrue(legacyImpl.hasAccessLevel("view", "AllanSvensson", "Main.WebHome", testWiki.getXWikiContext()));
    XWikiCachingRightService cachingImpl = new XWikiCachingRightService();
    Assert.assertTrue(cachingImpl.hasAccessLevel("view", "AllanSvensson", "Main.WebHome", testWiki.getXWikiContext()));
}
Also used : XWikiCachingRightService(org.xwiki.security.authorization.internal.XWikiCachingRightService) XWikiRightServiceImpl(com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl) Test(org.junit.Test)

Aggregations

XWikiRightServiceImpl (com.xpn.xwiki.user.impl.xwiki.XWikiRightServiceImpl)2 XWikiCachingRightService (org.xwiki.security.authorization.internal.XWikiCachingRightService)2 Before (org.junit.Before)1 Test (org.junit.Test)1