Great Problem editing document

Hi

I have a great problem editing document. On my form in Queryopendocument I have lotuscript to block unhautorized user to edit document. This work very good but If in view user right click document and choose Modify or something like this, Queryopendocumentevent does not occur and user can edit document.

Do you have a solution

Thanks

Subject: Great Problem editing document

You need to add code to both the post open and the queryModeChange

the postOpen code will prevent a document from opening in edit mode. it will through the user out.

the queryModeChange code will notify the user that they are not authorised to edit the document. The document remains in read mode.

Sub PostOpen(Source as NotesUiDocument)

if source.EditMode and cint(Source.FieldGetText(“Total”))>10000 then

msbox(“You cannot edit this document”)

'audit edit failure if you want

Call source.Close

End if

Sub QueryModeChange(Sourceas NOtesUiDocument)

if cint(Source.FieldGetText(“Total”))>10000 and Not Source.EditMode then

msbox(“You cannot edit this document”)

'audit edit failure if you want

Continue = False

End if

Regards Tim

Subject: Great Problem editing document

There is only one good way to prevent editing, Eric, and that’s to give users Author access and use Authors-type fields to control who can edit the document. Any other method is not part of the Notes security model, and can be gotten around by users who want to get around it.

Subject: RE: Great Problem editing document

How I can do to cancel editing based on a field content ?

Example : I have a field Total and I want to block editing mode if total greater than 1000 ?

Thanks

Subject: RE: Great Problem editing document

Condition the content of the Authors field in the document. So as the document is saved the Authors fields is updated with appropriate users.