jkee54
asked on
Cannot access database, then can anyway
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("[AgentLicMon th]" : "[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.
Help!
@IsNotMember("[AgentLicMon
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.
Help!
ASKER
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 | ?
(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 | ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
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?
ASKER
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?
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
CATCH:
Print "Unable to open hit counter"
Exit sub
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
CATCH:
Print "Unable to open hit counter"
Exit sub
(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)?