question for jerrith (script library)
Posted on 2002-05-01
I created one script library named
Name : Check_Role
And the code is
Dim roles As Variant
Dim found As Integer
Dim session As notessession
Set session =New notessession
Dim user As New NotesName(session.EffectiveUserName)
Forall r In roles
If r="[Static_Role]" Then
If Not found Then
Print "Sorry, " + user.Common + ".[<BR>]You are not authorized."
And script library I am calling in agent like this
and the agent i made as "run agent as web user"
Dim session As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim doc As notesdocument
Set db = session.currentdatabase
Set view = db.getview("Qstatic")
And I have some html code like this
Print "<title>Dialup MTD</title>"
Print "<body topmargin="0" leftmargin="0">"
Print "<div align='center'>"
Print"<font color='blue'>"&Format(Today, "Medium Date")&"</font></b><br>"
Now the problem is if the user is not having role permission its giving proper output like
U r not authorized.
If the user logs who is having the role permission its giving agent done.i don’t know where I am wrong .