Cannot access database, then can anyway

Posted on 2007-10-04
Medium Priority
Last Modified: 2013-12-18
I have a simple database to store reports.  It's set up with a frameset, left frame is an outline, right frame is the target for items chosen on the right.  Each outline item has a hide when like:
@IsNotMember("[AgentLicMonth]" : "[Admin]" : "[All Reports]" ;@UserRoles)
such that a person has to have one of those roles to get in.

When I email a doclink to a user who has one of the roles, he gets an error that he cannot access the database; however, when he clicks OK to that message, he gets in and can view what he is supposed to.

Default access is reader.  There is no other security (reader or author fields) on the database.  Document and view access is reader and above.

What I want is for the error not to happen, and the user with that role to get in without problems.


Question by:jkee54
  • 4
  • 2
LVL 22

Expert Comment

ID: 20015953
(1) Does this happen to other users?
(2) Did you create the link from a local replica rather than from the server?
(3) Is there any Database, View or Form code (QueryOpen, PostOpen, etc) that references other databases?
(4) Have you had any problems sending links to other users that do not have a role enabled (ie: what makes you think it has something to do with the user's role)?

Author Comment

ID: 20016289
Getting there!
(3) This was it - there is post open code in all the forms that reference another database to be able to count when the documents are opened.  It was set to No Access default - I upped it to Author to allow that record to be created.  

However, they still can't get in.  Now the error is, "you are not authorized to perform that operation", and the db does not open at all.

In my hide when, if I want users with any of those roles to get in, is the right operand : or should it be | ?
LVL 22

Accepted Solution

Bill-Hanson earned 1000 total points
ID: 20016548
You're hide-when syntax is correct and would not give an access error in any case.  Keep looking for code that executes behind the scenes.  In particular, look for two saves in the hit-counter code.  Author access would allow one save to a new document, but normally not two.  Also, depending on how the hit counter is designed, the code may try to update a profile document to which the user does not have access.  If either of these are the cause, increasing the access in the hit counter database to Editor should solve the problem.

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 22

Expert Comment

ID: 20016565
Check the hit counter's ACL and see how most users are authenticated.  Is it possible that this one user is not listed in the correct groups?

Author Comment

ID: 20016658
Upping to Editor does it.   The hit counter database is internal to my team and the users receiving the error did not have any access before - in fact, my last question would be, is this all background coding, i.e. if the users don't have the counter database on their desktops, they won't get it, right?
LVL 22

Expert Comment

ID: 20017784
They will get an error if the code cannot find the database.

If you want to ensure that all hits are recorded, then you need to deploy the hit counter db to the user's local machine.

If you don't care about local hits, then add an error trap to the code that opens the database.  There are several ways to do this.

(1) NotesDatabase.Open returns a flag indicating whether the database opened.
(2) You can check NotesDatabase.IsOpen.
(3) You can add a true error trap like this.

On Error goto CATCH
set db = db.Open("", "")
' Do something with database here.
call db.Close()
Exit Sub

Print "Unable to open hit counter"
Exit sub


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

This is an old article, please see an updated version of this article, located here: http://www.experts-exchange.com/articles/23619/Notes-8-5x-Windows-7-Notes-info-and-tips.html
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.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…

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