RDOACL object

 

RDOACL object represents the Access Control List (ACL) of an Exchange folder. This object along with the RDOACE object (representing an ACL entry) allows to define the list of Exchange users who have access to a given folder.

 

Returned by:

RDOFolder.ACL

 

The example below logs to the default MAPI session and adds an Exchange user to a list of users who have access to the Calendar folder. The user is given the editor rights.

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Folder = Session.GetDefaultFolder(olFolderCalendar)

'make sure we get back an Exchange user
set AddressEntry = Session.AddressBook.GAL.ResolveName("natalia")
set ACE = Folder.ACL.Add(AddressEntry)
ACE.Rights = ROLE_PUBLISH_EDITOR

 

The following example logs to the default MAPI session and enumerates all users who have access to the Calendar folder along with their rights

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Folder = Session.GetDefaultFolder(olFolderCalendar)

for each ACE in Folder.ACL
  Debug.Print ACE.Name & " - " & ACE.Rights
next

 


Derived from: IDispatch



Properties


Count

integer, read-only. Returns the number of folders in the list

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Folder = Session.GetFolderFromID(MAPIFolder.EntryID)

for i = 1 to Folder.ACL.Count
  set ACE = Folder.ACL.Item(i)
  Debug.Print ACE.Name & " - " & ACE.Rights
next

_Item(Index)

returns RDOACE object with a given index. Default object property.

Index - integer, 1 through Count.

see the example above

Folder

Returns the parent folder (RDOFolder object)

 

RawTable

IUnknown, read-only. Returns the IMAPITable Extended MAPI interface used internally by the RDOACL collection

 

Session

RDOSession, read-only. Returns the parent MAPI session represented by the RDOSession object

 

MAPITable

MAPITable, read-only. Returns the MAPITable Redemption object which can be used to manipulate the collection (restrict, find, etc).

 


Methods


Add(AddressEntryObjOrEntryID)

Adds an Exchange user to the folder ACL list. Returns the RDOACE object.

AddressEntryObjOrEntryID - variant. Either an RDOAddressEntry object or a (hex) string representing an Exchange user's entry id.

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Folder = Session.GetDefaultFolder(olFolderCalendar)

'make sure we get back an Exchange user
set AddressEntry = Session.AddressBook.GAL.ResolveName("natalia")
set ACE = Folder.ACL.Add(AddressEntry)
ACE.Rights = ROLE_PUBLISH_EDITOR

 

Item(Index)

returns RDOACE object with a given index.

Index - integer, 1 through Count.

 

Remove(Index)

Removes an ACL entry with a given index.

Index - integer, 1 through Count.

 

ACEofAddressEntry(AddressEntryObjOrEntryID)

Returns an RDOACE object corresponding to a given Exchange user. If the user is not in the ACL list, NULL is returned.

AddressEntryObjOrEntryID - variant. Either an RDOAddressEntry object or a (hex) string representing an Exchange user's entry id.

'check if a given Exchange user is in the ACL list

'and remove it

set Session = CreateObject("Redemption.RDOSession")
Session.Logon
set Folder = Session.GetDefaultFolder(olFolderCalendar)
set AddressEntry = Session.AddressBook.GAL.ResolveName("natalia")
set ACE = Folder.ACL.ACEofAddressEntry(AddressEntry)
if not (ACE is Nothing) Then
  ACE.Delete
  'or one can set the ACE.Rights property to RIGHTS_NONE (0)
End If