× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Gary,

I can't tell by looking what is wrong with your code, but it might be
helpful to know why you need to do this.

Mike E.



                                                                                
                                         
                    Gary.Wade@cityoforla                                        
                                         
                    ndo.net                    To:     
NOTES-L@LISTSERV.OKSTATE.EDU, DOMINO-L@LISTSERV.OKSTATE.EDU,      
                    Sent by:                    domino400@midrange.com          
                                         
                    domino400-bounces@mi       cc:                              
                                         
                    drange.com                 Subject:     Trying to add Admin 
group to mail files ACL and running out  
                                                of time                         
                                         
                                                                                
                                         
                    01/28/03 09:20 PM                                           
                                         
                    Please respond to                                           
                                         
                    Lotus Domino on the                                         
                                         
                    iSeries / AS400                                             
                                         
                                                                                
                                         
                                                                                
                                         




Have an urgent need to add my Admin group to about 1,000 mail files by end
of week.

Found some code at Sandbox and have been attempting to run it but not
having success.  Have a few begining developers with me but not
knowledgeable enough to tell me what's wrong - so begging for input!!

The below agent is signed by the server and I can see it running because
of "Print" statements in Log but if I move Print statement internal to
where code is supposed to be making changes no statements are made to the
Log - obviously skipping over the conditional statements.  I see no errors
in Agent Log.

The code was originally to be manually run from Actions list but that
didn't work so I commented those lines out and tried to run it as a
one-time Scheduled agent.  Would sincerely appreciate some help.

Sub Initialize

'<Initialization>
        Dim session As New NotesSession
        Dim dbdir As New NotesDbDirectory("")
        Dim db As NotesDatabase
        Dim dbacl As NotesACL
        Dim dbaclentry As NotesACLEntry
        Dim thisdb As NotesDatabase
        Set thisdb = session.currentdatabase
        thisServer = thisdb.server


'<Set value to the variables mailcat, acl_add, acl_type and acl_level>
(commented out lines were the original script, I added the "Let" lines
trying work it)
        'mailcat = Lcase(Inputbox("Which directory should this agent run
in?"))
        Let mailcat = "mail"
        'acl_add = Inputbox("What/Which Person, Server or Group should be
added as Manager to the ACL?")
        Let acl_add = "OrlAdmin"
        'acl_type = Inputbox("(0)Unspecified, (1)Person, (2)Server,
(3)Mixed Group, (4)Person Group or (5)Server Group?")
        Let acl_type = "Person Group"
        'acl_level = Inputbox("(0)No Access, (1)Depositor (2)Reader,
(3)Author, (4)Editor, (5)Designer or (6)Manager?")
        Let acl_level = "Manager"
        'If acl_level >= "3" Then
                'acl_delete = Ucase(Inputbox("Enable 'Delete Documents'?
(Y/N)"))
        Let acl_delete = "Y"
        'End If

        Set dbdir = session.GetDbDirectory("")
        Set db = dbdir.GetFirstDatabase(DATABASE)

        On Error Resume Next

'<Logging......>
'Call currentLog.LogAction("Running against DB: " + db.Title)

'<Check if the database is in the current specified mail catalog>
If Instr(db.filepath, mailcat+"\") > 0 Then

'<Create ACL entry based on specified input>
Set dbaclentry= dbacl.Getentry(acl_add)
If dbaclentry Is Nothing Then
Set dbaclentry=dbacl.Createaclentry(acl_add, acl_level)
Call dbacl.Save
End If

'(When I moved "Print" statement to here it did not show in Log)
Print "Completed ACL mod step"

dbaclentry.Usertype=acl_type
dbaclentry.Level=acl_level

'<Delete Documents access or not>
If acl_delete = "Y" Then
dbaclentry.CanDeleteDocuments = True
Else
dbaclentry.CanDeleteDocuments = False
End If

'<Save ACL>
Call dbacl.Save

'<End check if database is in current specified directory>
End If

'<Next database.........>
Set db = dbdir.GetNextDatabase

Wend

End Sub
-----------------------------------------------------------
Gary L Wade
Lotus Notes Administrator
City of Orlando - City Hall
400 S. Orange Ave.
PO Box 4990
Orlando, FL 32802-4990
(PH) 407.246.3796  (Fax) 407.246.2878
Gary.Wade@CityofOrlando.Net





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.