Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
FCREPO-1714. Moved FedoraUserSecurityContext instantiation to fad.
  • Loading branch information
mohideen committed Sep 1, 2015
1 parent 9e284e6 commit 362a501
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -28,8 +28,10 @@
import javax.jcr.Session;

import org.fcrepo.auth.common.FedoraAuthorizationDelegate;
import org.fcrepo.auth.common.FedoraUserSecurityContext;
import org.fcrepo.http.commons.session.SessionFactory;
import org.fcrepo.kernel.api.exception.RepositoryRuntimeException;

import org.modeshape.jcr.value.Path;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand Down Expand Up @@ -138,6 +140,12 @@ private boolean doHasPermission(final Session session, final Path absPath, final
return true;
}

@Override
public FedoraUserSecurityContext getFedoraUserSecurityContext(final Principal userPrincipal) {
return new FedoraUserSecurityContext(userPrincipal, this);
}


private static Principal getUserPrincipal(final Session session) {
final Object value = session.getAttribute(FEDORA_USER_PRINCIPAL);
if (value instanceof Principal) {
Expand Down

0 comments on commit 362a501

Please sign in to comment.