How to Prevent users from opening dox to read

Posted on 2003-11-21
Last Modified: 2013-12-18
Hi Guys


I know how to prevent editing a doc etc. also quite familar with reader and author fields

What I would like to be able to accomplish is:
In a view Any one can open the view and see the docs that are in Processing or Approved. However they cannot open the dox to read further than what is shown in the view.

Only the Requester and people listed in the authors field can see all the dox, in any Status.

Question by:adspmo
LVL 24

Assisted Solution

HemanthaKumar earned 100 total points
ID: 9798546
In the view, use form formula which will open different form for users not listed in Requester and Author fields


@If( @IsNotMember( @Name([CN]; @UserName); @Name([CN]; AuthorField : Requester) ); "Show Error Form"; Form);

LVL 24

Expert Comment

ID: 9798551
But anyway without using security fields like Reader/Author or encryption.. the doc and its content are not secured. User can still look into the doc using doc properties

Author Comment

ID: 9798687
The form does make use of reader and authors fields as well as an editrights field to control who can do what when

Thanx for the info

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

LVL 46

Expert Comment

by:Sjef Bosman
ID: 9798704
Form properties, last tab with key: change default readers
LVL 31

Expert Comment

ID: 9799347
Not sure what you mean.  Are there documents that certain people shoudl not see at all all -- not even in a view?  Or can everyone see all documents in the view, just not be able to open them to see the fields that are not displayed in the view?

If you want the ability to just restrict what fields are available to certain users, here are the options:

1) Use encryption keys.  Encrypted fields are completely invisible to users who do not have the key.  Note that key management can be a very major issue.

2) Put code in the form's QueyOpen that checks if user has access, and sets CONTINUE=FALSE if not.  This prevents openining the form.  However, it is not secure, because users can still get acces to the fields, or disable the script.  You should probably use a hidden design in this setup, but it will still not be truly secure.

3) Use a combination of standard documents and shadow documents.  The shadow documents will contains the "public" fields. Only the shadow document will be visible in public views.  The full document will be in hidden views, and have reader fields so only particular people can see them.  Put in code for the shadow form so that if a full document is available (i.e., you have reader acess), it immediately closes the shadow document and loads the full document. If the full document does not exist (i.e., it exists, but readers fields prevents user from seeing that it exists), then just display the shadow.  This is about as secure as #1, a little more complex to program, but avoids issus of key management.

Author Comment

ID: 9799617

The form formula is causing a few problems
Could be that there are multiple forms used within the view
So when I click LSF it opens with the wrong form

LVL 24

Expert Comment

ID: 9799764
To quickly check that create a view action button , and prompt out the form formula by selecting a document.

@Prompt([ok]; ""; @If( @IsNotMember( @Name([CN]; @UserName); @Name([CN]; AuthorField : Requester) ); "Show Error Form"; Form) );

Author Comment

ID: 9799948
Not quite right yet

Now it does not present my ErrorMessage form

@Prompt([OK]; ""; @If( @IsNotMember( @Name([CN]; @UserName); @Name([CN]; WhoCanSee : RequesterName) ); "BlaBla"; Form) )

When I am authorized to enter it presents the form name;
When I should be not authorized it gives me the BlaBla and then open the document
LVL 19

Expert Comment

ID: 9801261

@If( @IsNotMember( (@Name([CN]; @UserName); @Name([CN]; AuthorField : Requester) ); @Return(@Prompt([OK];"Not authorized";"You are not authorized to open this document."));"")

Try the above code.

And what is the error messages u r getting?
LVL 13

Accepted Solution

CRAK earned 150 total points
ID: 9803760
Do note that "others" can always use the property box to view what's in the rest of the document!
Qwaletee's suggestion to use encryption as the way to avoid that. The script solution to set contunue=talse (conditionally) would not be my advice. Using the debugger, clicking "stop" would bypass that code and open the document to everyone. Hemantha's solution does not have that advantage.

Are you perhaps having trouble creating new doc's in that view? Or does the author or requester field NOT contain the common username, but groups, userroles, abbreviated names, canonicalized names etc.? I suggest following modification to Hemantha's formula:

      @UserNamesList *= AuthorField : Requester;
            "Show Error Form")

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
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.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
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…

809 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