Solved

LotusScript code to test presence of a person in a group

Posted on 2010-08-15
6
1,269 Views
Last Modified: 2013-12-18
Hi
I have been asked to perform a task  to test if the user logged in is a member of a certain group to edit data in one form and was told it could be done in Lotusscript. Could anyone give me a idea about how to start with this, it would be much apprecated. Thanks :)
0
Comment
Question by:Coral_F
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 13

Expert Comment

by:CRAK
ID: 33443778
You could start in the group document and recursively look into it's content (in each group you could find people and groups).
Easier, but kind of "dirty" is to use evaluate on @UserNamesList.
0
 
LVL 11

Expert Comment

by:larsberntrop
ID: 33444093
It's not dirty but a great way to get this info.  

dim v as Variant
const certainGroup = "certainGroup"

v = Evaluate({@IsMember("} & certainGroup & {";@UserNamesList)}
If Isnumeric(v) Then
    If v = 1 Then Print "User is a member of the required group"
End  If
0
 

Author Comment

by:Coral_F
ID: 33449526
Thanks for your comments :) This is going to be used to lock down the form so only "certainGroup" can edit it. I can see that the first bit of code is to test to see if the user is in the group but how would you code the bit for if the user isnt in the group. would a prompt work? and where would this piece of code be best put? Postopen?
Thanks again for your help.
0
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!

 
LVL 13

Accepted Solution

by:
CRAK earned 250 total points
ID: 33452164
In that case: have you considered list that group in an authors field? Or rather: link the group to a userrole and list the role in an authors field. You'll have to apply that field/value to your documents, but from that point Domino will automatically control you can (not) edit the documents. Any other way is not a security measurement!

In answer to your question: QueryOpen and QueryModeChange (set 'Continue') would be your friends. In addition you could use the @IsMember formula in a hide formula of the edit button.

Why is that not a security measurement? One could still use smarticons, agents etc. to change field values on the document.
0
 
LVL 11

Assisted Solution

by:larsberntrop
larsberntrop earned 250 total points
ID: 33452254
For author fields to work, please remember to limit user access to 'Author' in the ACL, an only a few select individual with higher access.  Also, remember to assign the role to your servers....
0
 

Author Closing Comment

by:Coral_F
ID: 33453178
Thank you:)
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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

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.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

717 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