首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用VSTS REST上载的附件不适用于其他用户。

使用VSTS REST上载的附件不适用于其他用户。
EN

Stack Overflow用户
提问于 2017-08-22 12:39:37
回答 1查看 760关注 0票数 0

我使用VSTS使用修补程序请求将附件上载到工作项,它运行良好。现在,如果我在同一个团队项目中使用另一个用户从工作项访问附件,它表示未经授权的读取访问。

代码语言:javascript
复制
{"$id":"1","innerException":null,"message":"VS402330: Unauthorized Read access to the attachment under the areas ","typeName":"Microsoft.TeamFoundation.WorkItemTracking.Server.WorkItemUnauthorizedAttachmentException, Microsoft.TeamFoundation.WorkItemTracking.Server","typeKey":"WorkItemUnauthorizedAttachmentException","errorCode":0,"eventId":3200} 

注意:我使用的其他用户是在默认域中的Azure中创建的- ie - user.account@xyz.onmicrosoft.com。

这里是Repro步骤:

普雷库斯岩

  1. 向VSTS中添加几个用户(我在AzurePortal中使用默认域(AzurePortal)创建了5个用户,因此用户id类似于test.user01@xxxxoutlook.onmicrosoft.com)
  2. 将这些用户添加到集合级别安全区域中的集合级别用户组中
  3. 使用步骤2中创建的准备程序将这些用户添加到项目级别安全区域的"Team“中。

复制步骤:

  1. 使用这里的C#客户端库将附件上载到VSTS;要上载,我们需要使用某种形式的身份验证;该项目使用使用CredentialCache.DefaultCredentials的VssCredentials。我已经尝试过这一点,以及个人访问令牌,可以创建任何用户在vst用户安全领域。
代码语言:javascript
复制
1. After a successful upload, the API returns the reference url. Get the url;
2. Stick the url in browser and try to get the file using the same account that was used to upload it; The file should showup/download successfully.
3. Log off from vsts and login as one of the other users created in the prerequsites.
4. Stick the attachment url in browser and try to get the file again;
5. Instead of downloading the file, it throws Unauthorised read access.  `{ "$id": "1", "innerException": null, "message": "VS402330: Unauthorized Read access to the attachment under the areas ", "typeName": "Microsoft.TeamFoundation.WorkItemTracking.Server.WorkItemUnauthorizedAttachmentException, Microsoft.TeamFoundation.WorkItemTracking.Server", "typeKey": "WorkItemUnauthorizedAttachmentException", "errorCode": 0, "eventId": 3200 }` 

EN

回答 1

Stack Overflow用户

发布于 2017-08-24 05:22:35

在上传用户将附件关联到工作项之前,我可以复制此问题。有一个反馈,您可以投票和跟踪:VSTS REST上载附件文件问题

解决办法是,您可以将附件关联到工作项,然后其他人可以访问它们。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45817926

复制
相关文章

相似问题

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