@Test public void testCheckResourceReadPermission() throws Exception { Page publicPage = createMock(Page.class); expect(publicPage.getAllowDenyOrder()).andStubReturn(AllowDeny); expect(publicPage.isAllowed(READ, systemAdmin)).andStubReturn(true); expect(publicPage.isAllowed(READ, anonymous)).andStubReturn(true); replay(publicPage); WebloungePermissionUtils.checkResourceReadPermission(systemAdmin, publicPage); WebloungePermissionUtils.checkResourceReadPermission(anonymous, publicPage); }
public static void checkResourceReadPermission(final User user, final Resource<?> resource) throws PermissionException { checkResourcePermission(user, new SecurablePermission(resource, READ)); }
WebloungePermissionUtils { public static void checkResourceReadPermission(final User user, final Resource<?> resource) throws PermissionException { checkResourcePermission(user, new SecurablePermission(resource, READ)); } }
WebloungePermissionUtils { public static void checkResourceReadPermission(final User user, final Resource<?> resource) throws PermissionException { checkResourcePermission(user, new SecurablePermission(resource, READ)); }  }
WebloungePermissionUtils { public static void checkResourceReadPermission(final User user, final Resource<?> resource) throws PermissionException { checkResourcePermission(user, new SecurablePermission(resource, READ)); }  static void checkResourceReadPermission(final User user, final Resource<?> resource); static void checkResourcePermission(final User user, final SecurablePermission permission); }
WebloungePermissionUtils { public static void checkResourceReadPermission(final User user, final Resource<?> resource) throws PermissionException { checkResourcePermission(user, new SecurablePermission(resource, READ)); }  static void checkResourceReadPermission(final User user, final Resource<?> resource); static void checkResourcePermission(final User user, final SecurablePermission permission);  }