Example usage for org.springframework.security.acls.model AccessControlEntry getAcl

List of usage examples for org.springframework.security.acls.model AccessControlEntry getAcl

Introduction

In this page you can find the example usage for org.springframework.security.acls.model AccessControlEntry getAcl.

Prototype

Acl getAcl();

Source Link

Usage

From source file:ubic.gemma.security.audit.AclAuditLogger.java

@Override
public void logIfNeeded(boolean granted, AccessControlEntry ace) {

    if (!needToLog)
        return;/* w  w  w.j  a v a  2  s. c  o m*/

    if (ace instanceof AuditableAccessControlEntry) {
        AuditableAccessControlEntry auditableAce = (AuditableAccessControlEntry) ace;

        if (granted && auditableAce.isAuditSuccess()) {
            log.info("GRANTED due to ACE: " + ace + " ObjectIdentity=" + ace.getAcl().getObjectIdentity());
        } else if (!granted && auditableAce.isAuditFailure()) {
            log.warn("DENIED due to ACE: " + ace + " ObjectIdentity=" + ace.getAcl().getObjectIdentity());
        }
    }

}