Solved

LotusScript code to test presence of a person in a group

Posted on 2010-08-15
6
1,239 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
  • 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 10

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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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 10

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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
Problem "Can you help me recover my changes?  I double-clicked the attachment, made changes, and then hit Save before closing it.  But when I try to re-open it, my changes are missing!"    Solution This solution opens the Outlook Secure Temp Fold…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

744 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now