Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

LotusScript code to test presence of a person in a group

Posted on 2010-08-15
6
Medium Priority
?
1,286 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
Technology Partners: 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 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

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!

Question has a verified solution.

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

Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
This article covers general Notes 8.5 troubleshooting information including recreating the Notes\Data folder.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
Suggested Courses

618 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