Search DominoPower's 11,441 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
Who's on your ACL? (continued)

If there's one LotusScript concept I've really had to hammer into my head, it's arrays and how they work. But the pounding has paid off because the power of being able to create, populate and then manipulate the data in arrays has really been the key to most of the more powerful applications I've created.

I strongly recommend you stock up on the headache medicines and make arrays second nature.

Work those arrays
Now that you have seven different arrays that each contain names that may or may not be group names, it's time to go through the elements of each of the arrays one by one and see if any match group names in your PNAB. If the entry is indeed a group, we'll use the LotusScript rich text commands to write the name of the group and then print below it all of the members of that group. Since a little formatting goes a long way to making a document easier to read and understand, we'll make the most of the rich text creation features of LotusScript to indent (with two tabs) the list of all of the members of a group.

Below you can find the code that goes through the array of ACL entries with an access level of Manager and searches the "Groups" view of the PNAB to determine if the entry is a group. If it is a group it will return the values in the Members field. There is almost identical code for each of the other six access levels.

'--MANAGER LEVEL
Dim managerNames() As String
Dim k As Integer '-Only needs to be dimmed once at Manager level
k = 0
Dim managerRT As New NotesRichTextItem(doc, "ManagerReport")

Forall manager In managerArray
Set groupDoc = groupView.GetDocumentByKey(manager)
'--Note: Always check the return value to be sure the document exists
If groupDoc Is Nothing Then

Else
Call managerRT.AppendText(manager)
Call managerRT.AddNewLine(1)

Dim i As Integer '-Only needs to be dimmed once at the Manager level
i = 0
For i = 0 To Ubound(groupDoc.Members)
Redim Preserve managerNames(k)
managerNames(k) = groupDoc.Members(i)

Call managerRT.AddTab(2)
Call managerRT.AppendText(groupDoc.Members(i))
Call managerRT.AddNewLine(1)

k = k + 1
Next i
Call managerRT.AddNewLine(1)
End If

End Forall

Other uses
You can modify this agent for many other purposes that can really help you keep on top of either your database ACLs or the member groups in the PNAB. Here are some additional ideas as to how you can modify this agent for other purposes:

  • Modify the agent to go out and get a list of pre-defined (or user-defined through InputBoxes) group names and return a report showing who is currently a member of those groups.


« Previous  ·  1  ·  2  ·  3  ·  4  ·  Next »
Other articles you might like
Home > Lotus Technologies > Access Control (7 articles)
   Forcing immediate indexes to actually update immediately
   Enabling and disabling the single login setting in Notes 6
   Coding Domino server tasks in C: beyond Windows
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
Application development, William Shatner, and the origin of the universe
Learn Domino Designer 8.5 for free
The (near) future of Sametime, Quickr, Connections, and Symphony
Inside the IBM Innovations lab
Lotusphere 2010: Hot fixes and cool news for Notes, Domino, and LotusLive
Lotusphere 2010: mobility and collaboration
2010: A Lotusphere of change
Latest Lotus Headlines
Xpages not loading? JVM errors? - Solution
How to implement an iCalendar feed into your Notes calendar with XPages
DWA Hotfixes for Domino 8.5.1FP1 - A Gotcha
IBM Adds DB2 to Lotus Foundations SMB Package
SNTT : XPages onclick Ghosts in the machine
Ports used by Lotus Sametime 8.5 servers
Exploring a Domino Date Bug
>> Read all the news
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
OutlookPower: More about disappearing text
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Struggling with exporting Notes data to spreadsheets? No More!
Try IntelliPRINT, The world's leading Reporting, Dashboards, and Analysis solution for Notes & Domino

  • Don't spend unproductive time maintaining different versions of the same spreadsheet
  • Preserve data integrity and security in multi-user environments
  • Create reports in minutes INSIDE Notes
  • Get freedom from iterative report requests, deliver self-serve capabilities

Experience Reporting, Dashboards, and Analysis INSIDE Notes.

Try IntelliPRINT NOW!

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2010, ZATZ Publishing. All rights reserved worldwide.
Editor's Login