Commit 65242fba authored by Côme Chilliet's avatar Côme Chilliet

Merge branch '5825-ldap-error-in-audit-plugin' into '1.3-dev'

Resolve "LDAP error in audit plugin"

See merge request fusiondirectory/fd-plugins!235
parents c6678990 868efe45
<?php
/*
This code is part of FusionDirectory (http://www.fusiondirectory.org)
Copyright (C) 2015-2016 FusionDirectory
Copyright (C) 2015-2018 FusionDirectory
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......@@ -75,6 +75,7 @@ class auditEvent extends simplePlugin
'main' => array(
'name' => _('Event'),
'attrs' => array(
new HiddenAttribute ('fdAuditId'),
new GeneralizedTimeDisplayAttribute(
_('Time'), _('Date and time this event happened'),
'fdAuditDateTime', TRUE
......@@ -90,6 +91,12 @@ class auditEvent extends simplePlugin
);
}
function __construct ($dn = NULL, $object = NULL, $parent = NULL, $mainTab = FALSE, $attributesInfo = NULL)
{
parent::__construct($dn, $object, $parent, $mainTab, $attributesInfo);
$this->fdAuditId = mt_rand();
}
function compute_dn()
{
return $this->create_unique_dn('fdAuditDateTime', get_ou('auditRDN').$this->base);
......
......@@ -51,9 +51,15 @@ attributetype ( 1.3.6.1.4.1.38414.60.1.7 NAME 'fdAuditResult'
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15
SINGLE-VALUE )
attributetype ( 1.3.6.1.4.1.38414.60.1.8 NAME 'fdAuditId'
DESC 'FusionDirectory - Random int to be used in the DN'
EQUALITY integerMatch
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27
SINGLE-VALUE)
# Object Class
objectclass (1.3.6.1.4.1.38414.60.2.1 NAME 'fdAuditEvent'
DESC 'FusionDirectory - audit event'
MUST ( fdAuditDateTime $ fdAuditAction $ fdAuditAuthorDN $ fdAuditObject $ fdAuditObjectType )
MAY ( fdAuditAttributes $ fdAuditResult ) )
MAY ( fdAuditAttributes $ fdAuditResult $ fdAuditId ) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment