?
Solved

LotusScript code to test presence of a person in a group

Posted on 2010-08-15
6
Medium Priority
?
1,294 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 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 13

Accepted Solution

by:
CRAK earned 1000 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 1000 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Screencast - Getting to Know the Pipeline
Suggested Courses

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