2011-02-13 73 views
2

我想知道是否可以通过这种方式在用户的Exchange帐户中设置附加日历(日历文件夹中构建的子文件夹)的权限用户无法创建,编辑或删除约会。Exchange Web Services API:为审阅者权限的用户创建日历

我设法使用模拟帐户为用户创建附加日历。新日历可由用户访问。要撤消此文件夹上用户的权限,我将此文件夹上用户的权限级别设置为FolderPermissionLevel.Reviewer。

但是,当我测试新日历上的权限时,用户仍然能够在此日历中创建,编辑和删除事件。目前我想知道是否有可能撤销此用户的权限,因为他是整个帐户的所有者。

这是我使用的代码。

ExchangeVersion exchVersion = new ExchangeVersion(); 
exchVersion = ExchangeVersion.Exchange2010; 
ExchangeService service = new ExchangeService(exchVersion) 
       { 
        Credentials = new WebCredentials("[email protected]", 
                "password") 
       }; 

service.AutodiscoverUrl("[email protected]", url => true); 
service.ImpersonatedUserId = new ImpersonatedUserId(ConnectingIdType.SmtpAddress, 
                "[email protected]"); 
Folder addCalendar = new Folder(service); 
addCalendar.DisplayName = "Another Calendar"; 
addCalendar.FolderClass = "IPF.Appointment"; 
var perm = new FolderPermission(new UserId("[email protected]"), 
           FolderPermissionLevel.Reviewer); 

addCalendar.Permissions.Add(perm);         
addCalendar.Save(WellKnownFolderName.Calendar); 

Appointment app = new Appointment(service); 
app.Subject = "Test Appointment"; 
app.Start = new DateTime(2011, 2, 14, 10, 0, 0); 
app.End = new DateTime(2011, 2, 14, 11, 0, 0); 
app.Body = "Content"; 
app.Save(addCalendar.Id); 

回答

1

做在其他论坛上一些搜索和张贴后,我发现这是不可能限制任何种类的项目(例如日历或文件夹)的所有者的外汇帐户的权限。

+0

仍然没有找到任何解决方案?没有办法在[email protected]帐户中创建日历,并与[email protected]共享该日历并授予其审阅者权限? – Canastro 2011-09-21 16:35:05

相关问题