O. S.O 26.Mar.12 06:57 AM a Web browser Domino Designer 7.0.1 Windows XP
I am reposting my problem with regards to user access. The codes below enables the current user to view the document. But, he/she must also be
able to edit/delete the document. In the following codes, I am trying to set the user access of the current user, but the level turns into '0'.
Dim ss As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim username As Variant
Dim view As NotesView
Dim eval As Variant
Dim ws As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim level As Integer
On Error Resume Next
Set uidoc = ws.CurrentDocument
Set db = ss.CurrentDatabase
Set view = db.GetView("管理者ビュー")
eval = Evaluate(|@Name([ABBREVIATE];@Username)| )
Set doc = view.GetDocumentByKey(eval(0))
If Not doc Is Nothing Or db.QueryAccess(ss.UserName) = ACLLEVEL_MANAGER Then
'make the level of the user into editor or manager so the document can be edited
level = db.QueryAccess(ss.UserName) = ACLLEVEL_AUTHOR '<< this is what I am trying to do but the level turns into '0'
continue = True
continue = Falsee
I add db.QueryAccess(ss.UserName) = ACLLEVEL_MANAGER so that anyone with MANAGER role can access the document.
As you can see here, I checked the userlevel of the current user, it did give me level= 2 since the default is a READER, now I am stocked to setting the level into Author so
the current user can edit/delete the document.
Can anyone point me the right way in setting the user level?