PC Review


Reply
Thread Tools Rate Thread

Determining permission to another mailbox using RDO when user isin permission group

 
 
tEst
Guest
Posts: n/a
 
      24th Aug 2007
Hi all,
I am currently using RDO to read the current permission rights to a
delegate´s mailbox. I´m currently struggling on one particular situation:
we use groups to set permissions to users instead of setting them
directly to the acl.
Here´s an excerpt of what I did so far:

Dim Folder As RDOFolder =
Sess.GetFolderFromPath(applicationObject.ActiveExplorer.CurrentFolder.FolderPath)
Dim ace As RDOACE
For Each ace In Folder.ACL
If ace.Name = Sess.CurrentUser.Name Then
MsgBox(CStr(ace.Rights))
If ace.CanDeleteAll = True And ace.CanCreateItems =
True Then
NAR(ace)
ace = Nothing
Folder = Nothing
Return True
End If
End If
Next
ace = Nothing
Folder = Nothing

But this returns only the rights of the current entry. If the user is in
a permission group (I think we ar talking about public dist lists) I
cannot determine the actual permission level of that particular user.
Does anybody have an idea on how to detect the correct permission level
of a particular user?
Am I completely wrong with my code above? Does there exist another
(maybe low level) MAPI property where I can read the current permission,
or is there an entry in the active directory which I can access?

Thanks for any tip!

-Mike
 
Reply With Quote
 
 
 
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      24th Aug 2007
What do you see in Outlook when you look at that folder (RMB, Permissions
tab)?
What do you see in OutlookSpy (click IMAPIFolder, PR_ACL_TABLE tab)?

BTW, why are you using GetFolderFromPath? Use GetFolderFromID:

Dim Folder As RDOFolder =
Sess.GetFolderFromID(applicationObject.ActiveExplorer.CurrentFolder.EntryID)

Make sure you set RDOSession.MAPIOBJECT to Namespace.MAPIOBJECT from OOM to
make sure RDO and OOM use the same MAPI session.


Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"tEst" <(E-Mail Removed)> wrote in message news:fam92o$rjm$(E-Mail Removed)...
> Hi all,
> I am currently using RDO to read the current permission rights to a
> delegate´s mailbox. I´m currently struggling on one particular situation:
> we use groups to set permissions to users instead of setting them directly
> to the acl.
> Here´s an excerpt of what I did so far:
>
> Dim Folder As RDOFolder =
> Sess.GetFolderFromPath(applicationObject.ActiveExplorer.CurrentFolder.FolderPath)
> Dim ace As RDOACE
> For Each ace In Folder.ACL
> If ace.Name = Sess.CurrentUser.Name Then
> MsgBox(CStr(ace.Rights))
> If ace.CanDeleteAll = True And ace.CanCreateItems = True
> Then
> NAR(ace)
> ace = Nothing
> Folder = Nothing
> Return True
> End If
> End If
> Next
> ace = Nothing
> Folder = Nothing
>
> But this returns only the rights of the current entry. If the user is in a
> permission group (I think we ar talking about public dist lists) I cannot
> determine the actual permission level of that particular user.
> Does anybody have an idea on how to detect the correct permission level of
> a particular user?
> Am I completely wrong with my code above? Does there exist another (maybe
> low level) MAPI property where I can read the current permission, or is
> there an entry in the active directory which I can access?
>
> Thanks for any tip!
>
> -Mike



 
Reply With Quote
 
tEst
Guest
Posts: n/a
 
      24th Aug 2007
Hi Dmitry,

I´m sorry to ask: what do you mean by RMB?

In OutlookSpy I can see the following as Rows:
Row # 0
Maibox123-Reviewers
Mailbox123-PublishingEditors

Within the Rows there are five entries for each row:
PR_EntryID
PR_Instance_Key
PR_Member_ID
PR_Member_Name
PR_Member_Rights

I understand that I can read the actual entry of each of these rows with
ace.rights, but there are two questions left:
1 - how can I determine that an entry is a group instead of a person ?
2 - how can I resolve such permission groups to determine if a
particular user has sufficient permissions(I need to determine if the
user has delete permission) on that folder ?

Thanks again,

Mike

Dmitry Streblechenko schrieb:
> What do you see in Outlook when you look at that folder (RMB, Permissions
> tab)?
> What do you see in OutlookSpy (click IMAPIFolder, PR_ACL_TABLE tab)?
>
> BTW, why are you using GetFolderFromPath? Use GetFolderFromID:
>
> Dim Folder As RDOFolder =
> Sess.GetFolderFromID(applicationObject.ActiveExplorer.CurrentFolder.EntryID)
>
> Make sure you set RDOSession.MAPIOBJECT to Namespace.MAPIOBJECT from OOM to
> make sure RDO and OOM use the same MAPI session.
>
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> "tEst" <(E-Mail Removed)> wrote in message news:fam92o$rjm$(E-Mail Removed)...
>> Hi all,
>> I am currently using RDO to read the current permission rights to a
>> delegateŽs mailbox. IŽm currently struggling on one particular situation:
>> we use groups to set permissions to users instead of setting them directly
>> to the acl.
>> HereŽs an excerpt of what I did so far:
>>
>> Dim Folder As RDOFolder =
>> Sess.GetFolderFromPath(applicationObject.ActiveExplorer.CurrentFolder.FolderPath)
>> Dim ace As RDOACE
>> For Each ace In Folder.ACL
>> If ace.Name = Sess.CurrentUser.Name Then
>> MsgBox(CStr(ace.Rights))
>> If ace.CanDeleteAll = True And ace.CanCreateItems = True
>> Then
>> NAR(ace)
>> ace = Nothing
>> Folder = Nothing
>> Return True
>> End If
>> End If
>> Next
>> ace = Nothing
>> Folder = Nothing
>>
>> But this returns only the rights of the current entry. If the user is in a
>> permission group (I think we ar talking about public dist lists) I cannot
>> determine the actual permission level of that particular user.
>> Does anybody have an idea on how to detect the correct permission level of
>> a particular user?
>> Am I completely wrong with my code above? Does there exist another (maybe
>> low level) MAPI property where I can read the current permission, or is
>> there an entry in the active directory which I can access?
>>
>> Thanks for any tip!
>>
>> -Mike

>
>

 
Reply With Quote
 
Dmitry Streblechenko
Guest
Posts: n/a
 
      24th Aug 2007
By RMB I mean "right mouse button click", sorry about being cryptic.
When accessing ACE in RDO, you can use RDOACE.AddressEntry property to get
back the corresponding RDOAddressEntry object. You can them access the
RDOAddressEntry.DisplayType property and RDOAddressEntry.Members collection
to figure out the type of fthe address entry and (in case of a DL) access
its members.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"tEst" <(E-Mail Removed)> wrote in message news:fana1c$jmu$(E-Mail Removed)...
> Hi Dmitry,
>
> I´m sorry to ask: what do you mean by RMB?
>
> In OutlookSpy I can see the following as Rows:
> Row # 0
> Maibox123-Reviewers
> Mailbox123-PublishingEditors
>
> Within the Rows there are five entries for each row:
> PR_EntryID
> PR_Instance_Key
> PR_Member_ID
> PR_Member_Name
> PR_Member_Rights
>
> I understand that I can read the actual entry of each of these rows with
> ace.rights, but there are two questions left:
> 1 - how can I determine that an entry is a group instead of a person ?
> 2 - how can I resolve such permission groups to determine if a particular
> user has sufficient permissions(I need to determine if the user has delete
> permission) on that folder ?
>
> Thanks again,
>
> Mike
>
> Dmitry Streblechenko schrieb:
>> What do you see in Outlook when you look at that folder (RMB, Permissions
>> tab)?
>> What do you see in OutlookSpy (click IMAPIFolder, PR_ACL_TABLE tab)?
>>
>> BTW, why are you using GetFolderFromPath? Use GetFolderFromID:
>>
>> Dim Folder As RDOFolder =
>> Sess.GetFolderFromID(applicationObject.ActiveExplorer.CurrentFolder.EntryID)
>>
>> Make sure you set RDOSession.MAPIOBJECT to Namespace.MAPIOBJECT from OOM
>> to make sure RDO and OOM use the same MAPI session.
>>
>>
>> Dmitry Streblechenko (MVP)
>> http://www.dimastr.com/
>> OutlookSpy - Outlook, CDO
>> and MAPI Developer Tool
>>
>> "tEst" <(E-Mail Removed)> wrote in message news:fam92o$rjm$(E-Mail Removed)...
>>> Hi all,
>>> I am currently using RDO to read the current permission rights to a
>>> delegateZs mailbox. IZm currently struggling on one particular
>>> situation:
>>> we use groups to set permissions to users instead of setting them
>>> directly to the acl.
>>> HereZs an excerpt of what I did so far:
>>>
>>> Dim Folder As RDOFolder =
>>> Sess.GetFolderFromPath(applicationObject.ActiveExplorer.CurrentFolder.FolderPath)
>>> Dim ace As RDOACE
>>> For Each ace In Folder.ACL
>>> If ace.Name = Sess.CurrentUser.Name Then
>>> MsgBox(CStr(ace.Rights))
>>> If ace.CanDeleteAll = True And ace.CanCreateItems = True
>>> Then
>>> NAR(ace)
>>> ace = Nothing
>>> Folder = Nothing
>>> Return True
>>> End If
>>> End If
>>> Next
>>> ace = Nothing
>>> Folder = Nothing
>>>
>>> But this returns only the rights of the current entry. If the user is in
>>> a permission group (I think we ar talking about public dist lists) I
>>> cannot determine the actual permission level of that particular user.
>>> Does anybody have an idea on how to detect the correct permission level
>>> of a particular user?
>>> Am I completely wrong with my code above? Does there exist another
>>> (maybe low level) MAPI property where I can read the current permission,
>>> or is there an entry in the active directory which I can access?
>>>
>>> Thanks for any tip!
>>>
>>> -Mike

>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Administrators Group User do not have permission! Blue Fish Windows Vista General Discussion 2 5th Nov 2007 11:22 AM
What permission do I need to add a user to a group? (C#) Brian Hampson Microsoft Dot NET Framework 9 24th Jul 2006 07:52 PM
What permission do I need to add a user to a group? (C#) Brian Hampson Microsoft C# .NET 9 24th Jul 2006 07:52 PM
Can't remove a user's permission on my mailbox =?Utf-8?B?QmV0aGFueQ==?= Microsoft Outlook Installation 0 27th Mar 2006 11:06 AM
Prevent User to grant mailbox access permission David Li Microsoft Outlook 0 9th Dec 2003 09:30 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:56 AM.