Group: StrataFrame Users
Posts: 277,
Visits: 1.1K
|
Hi Marcio,
Setting the business object to enable auditing is not enough as there are 4 separate checks before auditing is enabled and 3 of the checks have to pass.
If you have the SF source code installed, take a look at the Auditor.vb file within the folder:-
\Program Files\MicroFour\StrataFrame Source Code\MicroFour StrataFrame Business\Security
This contains a function that is called to check if auditing is enabled and it is copied below just in case you don't have the source code:-
''' <summary> ''' Determines whether the data changes to the specified business object should take place. ''' The NeverAuditDataChanges and AuditDataChanges properties of the business object are checked ''' as well as the AuditDataChanges property of the current user. ''' </summary> ''' <param name="bo"></param> ''' <remarks></remarks> Public Shared Function ShouldAuditDataChanges(ByVal bo As BusinessLayer) As Boolean '-- If auditing is not enabled globally, then don't audit it If Not SecurityBasics.AllowAuditDataChanges Then Return False
'-- If the business object is set to never, then don't audit If bo.NeverAuditDataChanges Then Return False
'-- If the user is set to audit, then audit If SecurityBasics.CurrentUser.AuditDataChanges Then Return True
'-- Otherwise, just use the setting from the business object Return bo.AuditDataChanges End Function
The function first checks if auditing is enabled at all which is why you need to ensure you have set "SecurityBasics.AllowAuditDataChanges = true" or else you will fail at the first check. I believe this defaults to false so I suspect you are not getting beyond this step.
To summarise the steps:-
1. Is auditing enabled within the security system? The answer must be yes.
2. Is the business object never audited? The answer cannot be yes.
3. Is the user audited? The answer can be yes in which case auditing is enabled and the next check is not run.
4. Is the business object audited? This check is only run if the user is not set to audit. If the business object is set for auditing then you have passed the test.
The first two checks are compulsory and you must pass both. Then either 3 or 4 must pass.
Hope this helps.
|