• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

Lotus version 6. What do I need to do to make a form to only be able to open for certain people?

I have a view that displays documents that are created by an agent but I only want certain people to be able to open these documents.  I have tried creating a role and changing the key tab on the form but it is still available to all users.

0
sjmmajor
Asked:
sjmmajor
  • 7
  • 5
  • 2
1 Solution
 
Sjef BosmanGroupware ConsultantCommented:
Are all those people allowed to open all those documents? Are these generated documents in a view together with other documents?
0
 
HemanthaKumarCommented:
Create Readers type field and populate the role or group in this field.. So only those who are listed in this field can see the doc and open it.

~Hemanth
0
 
sjmmajorAuthor Commented:
They are allowed to view other documents in other views and they can view the documents in this view.  I just want only certain people to actually be able to open these particular documents.  Only the generated documents are in this view.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Sjef BosmanGroupware ConsultantCommented:
Changing the form won't be enough. The document contains the necessary settings, not the form, it merely displays a document. I suppose you need the following:
- an agent in LotusScript
- create a Readers-field with multiple values
- values "[YourRole]" and "[Manager]" to make sure a Manager can read all documents

Someone without YourRole will not even see the document appear in ANY view.
0
 
Sjef BosmanGroupware ConsultantCommented:
So they should be allowed to SEE the document in the view, but they are not allowed to OPEN the document in a form? Then you need to do some checking in the QueryOpen-event in the form. If someone lacks YourRole, Continue must be set to False.
0
 
sjmmajorAuthor Commented:
sjef - Yes, do you know the script off hand?
0
 
HemanthaKumarCommented:
sjmmajor,

Then add this script to the queryopen of the doc

Dim session As New NotesSession
Dim acl As NotesACL    
Dim entry As NotesACLEntry

Set db = session.CurrentDatabase
Set acl = db.ACL
Set entry = acl.GetEntry( session.CommonUserName )

If entry Is Nothing Then
  Set entry = acl.GetEntry( session.UserName )
End If

If entry Is Nothing Then
   Msgbox "You are not authorized to open this doc"
   Continue = False
End If

If entry.IsRoleEnabled( "[UserRole]" ) Then
   Msgbox "You are not authorized to open this doc"
   Continue = False
End If
0
 
sjmmajorAuthor Commented:
Well I got it to show not authorized but I am in that group.  So I guess is there an If entry.is not role enabled?
0
 
Sjef BosmanGroupware ConsultantCommented:
Version 6 eh?

Dim session As New NotesSession
Dim v As Variant

Set db = session.CurrentDatabase
v= Evaluate("@UserRoles")
If IsNull(ArrayGetIndex(v, "[UserRole]")) Then
   Msgbox "You are not authorized to open this doc"
   Continue = False
End If

I don't like Evaluate, but it sure comes in handy sometimes...
0
 
sjmmajorAuthor Commented:
I changed in your first code to "IF not entry.isroleenabled" and I do get the message on only people not in the role but it also gives and error message "Object Not Set" after it gives the not authorized message.  Your last code I get the Not authroized message myself.  Should I have replaced all of the previous code?  I did but maybe I shouldn't.

0
 
sjmmajorAuthor Commented:
Never mind.  In the last code I forgot to change Userrole to the correct name.  The last one worked!!! No errors.  I am going to go around and try the function on some other emails.  

Thanks so much!!
0
 
sjmmajorAuthor Commented:
Perfect.  Thanks for your quick responses!  Everything seems to be working.

0
 
Sjef BosmanGroupware ConsultantCommented:
Hemantha's code is functionally equivalent to mine, you could have given him a piece of the cake.

Thanks!
0
 
sjmmajorAuthor Commented:
Your right.  My apologizes.  I get so caught up with what I am doing that I need to remember to revisit all responses.  
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

  • 7
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now