Search in sources :

Example 1 with AuditLogUris

use of com.enonic.xp.audit.AuditLogUris in project xp by enonic.

the class SecurityAuditLogSupportImpl method removeRelationship.

@Override
public void removeRelationship(final PrincipalRelationship relationship) {
    if (isEnabledAuditLogs) {
        PropertyTree data = new PropertyTree();
        PropertySet paramsSet = data.addSet("params");
        paramsSet.setString("principal", relationship.getTo().toString());
        paramsSet.setString("leaves", relationship.getFrom().toString());
        AuditLogUris auditLogUris = AuditLogUris.from(relationship.getTo().toString(), relationship.getFrom().toString());
        log("system.security.principal.removeRelationship", data, auditLogUris);
    }
}
Also used : AuditLogUris(com.enonic.xp.audit.AuditLogUris) PropertyTree(com.enonic.xp.data.PropertyTree) PropertySet(com.enonic.xp.data.PropertySet)

Example 2 with AuditLogUris

use of com.enonic.xp.audit.AuditLogUris in project xp by enonic.

the class SecurityAuditLogSupportImpl method addRelationship.

@Override
public void addRelationship(final PrincipalRelationship relationship) {
    if (isEnabledAuditLogs) {
        PropertyTree data = new PropertyTree();
        PropertySet paramsSet = data.addSet("params");
        paramsSet.setString("principal", relationship.getTo().toString());
        paramsSet.setString("joins", relationship.getFrom().toString());
        AuditLogUris auditLogUris = AuditLogUris.from(relationship.getTo().toString(), relationship.getFrom().toString());
        log("system.security.principal.addRelationship", data, auditLogUris);
    }
}
Also used : AuditLogUris(com.enonic.xp.audit.AuditLogUris) PropertyTree(com.enonic.xp.data.PropertyTree) PropertySet(com.enonic.xp.data.PropertySet)

Aggregations

AuditLogUris (com.enonic.xp.audit.AuditLogUris)2 PropertySet (com.enonic.xp.data.PropertySet)2 PropertyTree (com.enonic.xp.data.PropertyTree)2