Lock access to views
Databases often end up with many views. This is usually because different people want to see different data in different ways. Well, what if you don't want some people to be able to see certain views on the web e.g. an "Application Settings" view that is only administered via the client. The best way to do this is probably to restrict the list of who can access the view in its properties.
But this is not always possible if the necessary Roles and Groups don't exist. What you may want to do is simply stop people from being able to see the view over the web. Here's how to do it:
- For all views that you want people to see over the web create a $$ViewTemplate for ViewName form with that view embedded in it.
- Create a form called $$ViewTemplateDefault which will be used by all other views that simply contains an "Access Denied" message and no embedded view.
- Do the same with forms called $$SearchTemplate for ViewName and $$SearchTemplateDefault so as to stop people being able to search these views.
It is worth pointing out at this point that this is by no means a security model. It simply stops your casual user from stumbling across things they shouldn't.
A Built-in Alternative
Domino offers another more convenient way to prevent web users from accessing views.
In Domino Designer, choose a view from the list of views (but do not open it), click on the properties SmartIcon or use the menu Design|Design Properties. Go to the Design tab in the properties dialog (the 3rd tab), and check the property "Hide design element from Web Browsers."
Enjoy, Todd Harris
Reply
Re: A Built-in Alternative
I did a brief test on this the other day, and I think this method will prevent the HTTP task in general from seeing the veiw. That includes Web Query Open/Save agents, and agents run from the web.
Just something to look out for so you don't chase a bug for hours.
Reply
Show the rest of this thread
Stop peeping Toms and peeping Tonia's
[<font color=navy><i>Interesting!! These are the methods I use.</i><br><br>] Many people, try to circumvent the navigation structure of your domino web application by typing one of the following into the location bar:
www.domainname.tld/dbname.nsf/$DefaultNav www.domainname.tld/dbname.nsf/$DefaultView www.domainname.tld/dbname.nsf/$DefaultForm
The first two options result in the person seeing a list of all your unsecured unhidden views, such as By Unique ID and By Keyword. When they click on the links the will be able to see these views, which is probably not what you wanted. Or they may be able to see the views in a way other than what you intended, for example - if the view is normally seen embedded, it will be shown here in the $$ViewTemplateDefault or $$ViewTemplate for *
Try it yourself and see.
To prevent this, create a redirection document in your Domino Directory for the server / virtual server. Incoming URL string = */%24Def* Redirect URL = www.yourdomain-name.co.uk When done restart the http task and then try it yourself.
Another method is much more simpler. If like me (and Jake) you use view names in the URL, this is useful. I have www.aj-connection.com/ajc/web.nsf/public/introduction as the start page for a web application, but I do not want people using www.aj-connection.com/ajc/web.nsf/public to see what else the view contains. Restricting access to the view will be counter productive, as this will also prevent people reading the documents. So instead I 1. Make sure that the views I do to browse have a $$ViewTemplate for * 2. Make a $$ViewTemplateDefault
use "Hide if formula is true" with !@Name([CN];@Username)="Jez Daniels" on the $$ViewBody of the view template which I do not want people using. Thus, if I want to see ot on the web, I just have to: 1. type www.domain.com/dbase.nsf!Open&login 2. Login and find the view in question.
The anonymous user will still be able to access documents contained in the views using the URL's I provide.
AFTER writing this piece, I found this: http://www.codestore.net/A55692/store.nsf/all/0E5C6C349E9889EC8625699F00360442?O penDocument There are however some differences.
Jez D
Reply