mendix / audittrailmodule Goto Github PK
View Code? Open in Web Editor NEWThis module ensures tracking of the data changes made in the system.
License: Apache License 2.0
This module ensures tracking of the data changes made in the system.
License: Apache License 2.0
When the java-action creates a logline for a reference or reference set, all information about the referenced object is copied to the new/old values string which makes it quite unreadable.
Is there a way to only see one attribute/member in de new/old values instead of all?
I read something about using the Model Reflection module (#6 ), but I don't know how I have to do this.
See also my comment in the AppStore. I believe the fix is very simple; in log/CreateLogObject when checking
else if( CreateLogObjectWithoutMemberChanges ) {
change this to
else if( CreateLogObjectWithoutMemberChanges || logType == TypeOfLog.Delete) {
When using auditing on Account, the logic gets confused. If user Admin changes user NormalUser, it would appear in the audit trail that NormalUser made the change.
We log only changed attributes. In that situation, deletes go unnoticed because there are no changed attributes. With debug logging, log message No log lines created (no attributes changed), appears.
Also we want to log when the user's time zone or language changes.
I attached a changed file. Just search for Marcel
Hi,
Since the FormatString widget is deprecated, please change the widget to HTML Element in the snippet called "LineDetailsSnippet".
Hi. I noticed that when the current user has no read access to some members of a audited entity saving it fails.
The line that fails is:
// get current and previous id
final IMendixIdentifier currentId = member.getValue(currentcontext);
For instance
Caused by: com.mendix.basis.objectmanagement.member.MemberAccessDeniedException: Read access denied for member 'Cover.Cover_CoverVendorUser' of object 'Cover.Cover'
at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.checkReadAccess(MendixObjectMemberImpl.java:161)
at com.mendix.basis.objectmanagement.MendixObjectMemberImpl.getValue(MendixObjectMemberImpl.java:208)
at audittrail.log.CreateLogObject.createReferenceLogLine(CreateLogObject.java:286)
at audittrail.log.CreateLogObject.createLogLines(CreateLogObject.java:224)
at audittrail.log.CreateLogObject.createAuditLogItems(CreateLogObject.java:183)
at audittrail.log.CreateLogObject.createAuditLogItems(CreateLogObject.java:70)
at audittrail.actions.CreateLogRecordOfObject.executeAction(CreateLogRecordOfObject.java:43)
at audittrail.actions.CreateLogRecordOfObject.executeAction(CreateLogRecordOfObject.java:1)
at com.mendix.systemwideinterfaces.core.UserAction.execute(UserAction.java:58)
Why are you using currentcontext
instead of sudocontext
here. I don't think currentcontext
is good for anything in this module.
__Version 9.0.1
We would like to give a user without an Administrator role the possibility to view audit trail info. In our sample app project user role "User" does not have the AuditTrail.MxAdministrator role, but (only) module role "BasicRightsAudittrail".
Trying to use snippet AuditTrail.LogOverviewSnippet on Home_User page gives:
Executing action failed for security reasons: DSO_ToggleUI Error: Executing action failed for security reasons: DSO_ToggleUI
We do not want to give the non-admin user the module role MxAdministrator (because module role MxAdministrator has also delete rights for several entities, etc.)
Proposed changes:
Edwin van Elk
Ordina DS
Please add the boolean constant ReferenceLogLineEnabled
default true and if it's false, then don't create ReferenceLogLine objects.
In our app the number of ReferenceLogLine objects created is too high. We have a workaround that abuses Mendix ListenersRegistry by clearing com.mendix.basis.action.user.CommitAction#entityName
, but we'd like to replace it with a legal solution.
When a log object is created, a date attribute is set in two places:
In my case, this result in incorrect/unclear dates in the LogOverviewSnippet.
Please enable Store 'createdDate'
and the others for AudittrailSuperClass
. The module users are not allowed to do that in their specializations. See System.FileDocument as an example. These 4 system attributes are enabled there for a reason.
In my opinion it does not make sense to log an associated object with all it's members. This is clogging up the database unnecessarily. An option I implemented for this is to per AuditTrailSuperClass specialisation, populate an extra to be created attribute in the ModelReflection.MxObjectReference called KeyAttribute.
Only show this KeyAttribute to the user if a LogLine for a reference is shown.
Currently the module doesn't handle Decimals correctly. There are two problems, one really a bug and the other would be a nice improvement:
BUG: In the database the Decimal is always stored with 8 decimals. If on the page the Decimal attribute's UI is set to for instance 2 decimals, every time this attribute is committed, the module interprets this as a change, because it checks the value with 2 decimals with the one with 8 decimals, which will never agree.
Upgrade: The module always stores 8 decimals. When there are trailing zeros it would be nice to being able to not show those.
See also forum post: https://forum.mendixcloud.com/link/questions/98479
When having references in oldvalues/newvalues, there are some words/tags
repeated over and over again.
MendixIdentifier / entityID / entityID
Takes significant space when you have many references and Many objects.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.