首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >确定CalDAV日历的访问权限

确定CalDAV日历的访问权限
EN

Stack Overflow用户
提问于 2019-07-20 00:19:35
回答 1查看 299关注 0票数 2

我正在创建一个PHP应用程序,它将把事件写入CalDAV日历(Kolab groupware)。为此,我请求相应用户的日历主页集。在此之后,我只想使用我有写权限的日历。很可能我收到的共享日历只允许我阅读。那么,在注册事件并接收错误消息之前,如何确定对日历的访问权限?

提前谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2019-07-20 20:15:39

要获得CalDAV(/*DAV)资源/集合权限,可以在检索日历列表时查询{DAV:}current-user-privilege-set属性。

这是RFC 3744 (WebDAV ACL)的一部分。来自RFC的示例:

代码语言:javascript
运行
复制
   PROPFIND /papers/ HTTP/1.1
   Host: www.example.com
   Content-type: text/xml; charset="utf-8"
   Content-Length: xxx
   Depth: 0
   Authorization: Digest username="khare",
     realm="users@example.com", nonce="...",
     uri="/papers/", response="...", opaque="..."

   <?xml version="1.0" encoding="utf-8" ?>
   <D:propfind xmlns:D="DAV:">
     <D:prop>
       <D:current-user-privilege-set/>
     </D:prop>
   </D:propfind>
代码语言:javascript
运行
复制
   HTTP/1.1 207 Multi-Status
   Content-Type: text/xml; charset="utf-8"
   Content-Length: xxx

   <?xml version="1.0" encoding="utf-8" ?>
   <D:multistatus xmlns:D="DAV:">
     <D:response>
     <D:href>http://www.example.com/papers/</D:href>
     <D:propstat>
       <D:prop>
         <D:current-user-privilege-set>
           <D:privilege><D:read/></D:privilege>
         </D:current-user-privilege-set>
       </D:prop>
       <D:status>HTTP/1.1 200 OK</D:status>
     </D:propstat>
     </D:response>
   </D:multistatus>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57116267

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档