Solved

LotusScript code to test presence of a person in a group

Posted on 2010-08-15
6
1,257 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
Independent Software Vendors: 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

Independent Software Vendors: 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

Suggested Solutions

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…
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

726 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