Hi all,
I have a situation here. I want to check that the NAV user is not changing the computer system date when posting some special entries. For some special real-time recording, I have to check with the System date and verify that the date is correct (and not backdated).
For this I designed a solution in which I use a NAV table (
Sometable) and keep the System date in "
LastDate" [DATE] field upon login. Then when the posting is done, I test the entry to make sure that the system date is valid and matching the value in the table. Actually I check that like this:
IF "Posting Date" < Sometable.LastDate THEN
ERROR('Postings cannot be done in backdate.');
Every day, when the users log-in to NAV, the system over-writes the value with the latest System Date.
Now the problem is that I also want that no user can change the value saved in that special table by running a process-only report. Currently the user can trick my system by making a Process-only report like this one and programatically changing the stored value in the table to any backdate.
[b]SomeTable - OnAfterGetRecord()[/b]
LastDate := DMY2DATE(01,01,2009);
MODIFY;
What can I do to protect my value in the table from indirect changes like this? I considered requesting a NAV license to block MODIFY permission, but in that case, even I would not be able to update the Date value upon login. The users I am taking about here have programming permissions in the database.
Please advice.
Comments
if "posting date" < today then error(' [-X ' );
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog
I could not use the "TODAY" function because, if you have sensed the background, the users are very smart.
They will goto the Control Panel of Windows and change the system date. Then NAV's TODAY function will return whatever is the changed system date.
To counter this threat, I made the plann to record the last login date into a table and then check if someone is trying to do tricks. If the value in the table is more than the System date, then show an error during login.
For your information, the clients are using NATIVE NAV DB.
2. manage permissions of the users, but if i'm correct, they can do everything, so they can also write code to avoid this and/or change permissions as they want...in this case, i think there's no solutions...
"Never memorize what you can easily find in a book".....Or Mibuso
My Blog