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
Solved

Evaluating Group name members with script

Posted on 2004-08-09
3
234 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
names.nsf ODS upgrade 4 454
SQL Server linked server to Lotus notes 3 503
Get files more than 50 GB from F drive on list of servers 8 102
xss alert in domino url 9 33
Lack of Storage capacity is a common problem that exists in every field of life. Here we are taking the case of Lotus Notes Emails, as we all know that we are totally depend on e-communication i.e. Emails. This article is fully dedicated to resolvin…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.

839 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