Giter Site home page Giter Site logo

audittrailmodule's People

Contributors

dahfjkg avatar grootjans avatar hugomendix avatar nimatrueway avatar passalaqua avatar pijuskri avatar pouyaist avatar roelandsalij avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

audittrailmodule's Issues

Loggin of reference (set) - readable old/new values

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.

Audit trail on account, log deletes when only changed attributes are logged.

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

CreateLogObject.zip

FormatString to HTML Element

Hi,

Since the FormatString widget is deprecated, please change the widget to HTML Element in the snippet called "LineDetailsSnippet".

Read access denied at createLogLines

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

Access to audit log for non-admin users

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:

  • make MF DSO_ToggleUI available for role "BasicRightsAudittrail" too
  • make MF OCl_ToggleUI available for role "BasicRightsAudittrail" too
  • give NP entity AuditTrail.UIToggle read access for role "BasicRightsAudittrail"
  • make page LogLine_View available for role "BasicRightsAudittrail"

Edwin van Elk
Ordina DS

no tag for the released 9.0.1 package

Hello,
A 9.0.1 release of this module as been created the 8th April 2022.
image

But I did not see its associated source code in the Github repo ( No tag ).

So my company refuses to use It.

can you please create the right tag ?

Thanks

Feature request: add flag to suppress creation of ReferenceLogLine

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.

Suggestion for date localization

2022-12-15 11_07_07-Mendix - Homepage

When a log object is created, a date attribute is set in two places:

  1. Log.DateTime is shown on LogOverviewSnippet but is not localized, you see the UTC date. I would suggest localize this in the data model (or add UTC as a description in the snippet).
  2. Log.Description has a value 'UTC' appended at the end but I think this one is obsolete, since this is the localized date.

In my case, this result in incorrect/unclear dates in the LogOverviewSnippet.

Improve logging of references - do not log full referenced object

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.

Improve Decimal handling

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.