Solved

Evaluating Group name members with script

Posted on 2004-08-09
3
231 Views
Last Modified: 2013-12-18
Hi Guys

The users go into a database and can see only their own documents. The ACL says reader/no roles for group name. The documents say that feild x has the persons name in it and it is a 'Readers type field.
However the user can go into edit (button/double click/ctrl-e), make changes but gets rejected when they try to save the changes. This is a good thing but how do I keep them from getting into edit. Code in the QueryModeChange??

I think the problem has to do with evaluating Group name members with script.

0
Comment
Question by:imjamesw
3 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 11755199
They could have access through some other ACL entry, or there could be a chacheing issue on either client or server.

Restart the server, shut down the clients, and delete teh cache.dsk from all clients.
0
 

Author Comment

by:imjamesw
ID: 11755229
The records are created by an agent

The users are only readers

The ACL checks out OK
0
 
LVL 19

Accepted Solution

by:
madheeswar earned 350 total points
ID: 11760967
try below code:

Sub Querymodechange(Source As Notesuidocument, Continue As Variant)
            Dim session As New notessession
      Dim item As notesitem
      Dim doc As notesdocument
      Dim result As Variant
      Dim macro As String
      
      Set doc=Source.document
      user=session.commonusername
      
      user_roles =Evaluate("@UserNamesList")
'this is for roles:
      Forall role In user_roles
            
            If ( role = "[Admin]")  Or (role="[Manager]") Or (role="[Partners]") Or (role="[Secretary]") Then
                  
                  continue=True
                  Exit Sub
            End If
            
      End Forall
      
      Dim readitem As notesitem
      Set readitem=doc.Getfirstitem("readers") 'to get user names from a field saved in the document      
      For x=0 To Ubound(readitem.values)
            If user=readitem.values(x) Then
                  continue=True
                  Exit Sub
            End If
      Next
      doc.SaveOptions="0"
      Msgbox "You are not authorized to edit this document",64,"Information"
      continue=False
      Exit Sub
      'Call Source.close
      End      
End Sub
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I thought it will be a good idea to make a post as it will help in case someone else faces these issues. I trust this gives an idea how each entry in Notes.ini can mean a lot for the Domino Server to be functioning properly. This article discusses t…
For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question