?
Solved

Evaluating Group name members with script

Posted on 2004-08-09
3
Medium Priority
?
238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

752 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