Skip to content

Commit

Permalink
Merge branch 'master' into hierarchy
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Woods committed May 22, 2014
2 parents e629670 + 8b51bd1 commit a04bad4
Show file tree
Hide file tree
Showing 385 changed files with 5,899 additions and 1,185 deletions.
3,037 changes: 3,037 additions & 0 deletions compile.out

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion fcrepo-audit/src/main/java/org/fcrepo/audit/Auditor.java
Expand Up @@ -29,7 +29,7 @@ public interface Auditor {

/**
* @param e
* The {@Event} to record.
* The {@link Event} to record.
* @throws RepositoryException
*/
@Subscribe
Expand Down
Expand Up @@ -36,6 +36,11 @@

import com.google.common.eventbus.EventBus;

/**
* <p>LogbackAuditorTest class.</p>
*
* @author eddies
*/
public class LogbackAuditorTest {

private final int jcrEventType = 1;
Expand Down
Expand Up @@ -34,7 +34,7 @@ public class FedoraAdminSecurityContext implements AuthorizationProvider,
private boolean loggedIn = true;

/**
* @param request
* @param username
*/
public FedoraAdminSecurityContext(final String username) {
super();
Expand Down
Expand Up @@ -30,8 +30,6 @@
* </p>
*
* @author Gregory Jansen
* @see org.fcrepo.auth.roles.common.AbstractRolesAuthorizationDelegate
* @see org.fcrepo.auth.roles.basic.BasicRolesAuthorizationDelegate
*/
public interface FedoraAuthorizationDelegate {

Expand Down
Expand Up @@ -106,7 +106,7 @@ public final boolean hasRole(final String roleName) {
/**
* Get the user principal associated with this context.
*
* @return
* @return the user principal associated with this security context
*/
public Principal getEffectiveUserPrincipal() {
if (this.loggedIn && this.userPrincipal != null) {
Expand Down
Expand Up @@ -37,7 +37,7 @@

/**
* @author bbpennel
* @date Feb 12, 2014
* @since Feb 12, 2014
*/
public class FedoraUserSecurityContextTest {

Expand Down
Expand Up @@ -37,7 +37,7 @@
/**
* @author daines
* @author bbpennel
* @date Mar 6, 2014
* @since Mar 6, 2014
*/
public class HttpHeaderPrincipalProviderTest {

Expand Down
Expand Up @@ -50,7 +50,7 @@

/**
* @author bbpennel
* @date Feb 12, 2014
* @since Feb 12, 2014
*/
public class ServletContainerAuthenticationProviderTest {

Expand Down
Expand Up @@ -34,6 +34,11 @@
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
* <p>Abstract AbstractResourceIT class.</p>
*
* @author gregjan
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration("/spring-test/test-container.xml")
public abstract class AbstractResourceIT {
Expand Down
Expand Up @@ -26,6 +26,11 @@
import org.junit.Test;


/**
* <p>FedoraResponseCodesIT class.</p>
*
* @author gregjan
*/
public class FedoraResponseCodesIT extends AbstractResourceIT {

@Test
Expand Down Expand Up @@ -108,8 +113,10 @@ public void testDeniedPutDatastream() throws Exception {
public void testGetDatastreamContent() throws Exception {
final String pid = getRandomUniquePid() + "Permit";
// TODO requires Grizzly client authN, see:
// https://java.net/projects/jersey/sources/svn/content/trunk/jersey/samples/https-clientserver-grizzly/src/main/java/com/sun/jersey/samples/https_grizzly/Server.java?rev=5853
// https://java.net/projects/jersey/sources/svn/content/trunk/jersey/samples/https-clientserver-grizzly/src/main/java/com/sun/jersey/samples/https_grizzly/auth/SecurityFilter.java?rev=5853
// https://java.net/projects/jersey/sources/svn/content/trunk/jersey/samples/https-clientserver-grizzly/src
// /main/java/com/sun/jersey/samples/https_grizzly/Server.java?rev=5853
// https://java.net/projects/jersey/sources/svn/content/trunk/jersey/samples/https-clientserver-grizzly/src
// /main/java/com/sun/jersey/samples/https_grizzly/auth/SecurityFilter.java?rev=5853

final HttpPut objMethod =
putObjMethod(pid);
Expand Down
Expand Up @@ -206,10 +206,9 @@ public void shouldDenyWithRecursion() throws RepositoryException {
when(writableNode.hasNodes()).thenReturn(true);
when(writableNode.getNodes()).thenReturn(nodeIterator(readableNode));

assertFalse(
"Should deny remove for a writable node which has an unwritable child with depth greater than one level",
authorizationDelegate.hasPermission(mockSession, parentPath,
REMOVE_ACTION));
assertFalse("Should deny remove for a writable node which has an unwritable child with depth greater " +
"than one level",
authorizationDelegate.hasPermission(mockSession, parentPath, REMOVE_ACTION));
}

}
Expand Up @@ -114,7 +114,7 @@ public void setUp() throws RepositoryException {
final Map<String, List<String>> readerAcl =
singletonMap("user", asList("reader"));
final Map<String, List<String>> emptyAcl =
singletonMap("user", Collections.<String> emptyList());
singletonMap("user", Collections.<String>emptyList());
final Map<String, List<String>> unrecognizableAcl =
singletonMap("user", asList("something_else"));

Expand Down

0 comments on commit a04bad4

Please sign in to comment.