对通过讨论区上传的文件设置唯一权限. [英] Set unique permission on files which were upload through discussion board.

查看:54
本文介绍了对通过讨论区上传的文件设置唯一权限.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我已经创建了具有唯一权限的讨论.当用户在讨论中上传文件时,我想做以下事情:

I have created a discussion with unique permission. When user uploads files in the discussion I want to do following things:

1.设置讨论区的默认库(消息内容类型).

1. Set a default library for the discussion board(Message Content type).

2.与具有该讨论区权限的用户一起对该文件设置唯一权限.

2. Set the unique permission on that file with the user who has permission on that discussion board.

您能帮助解决此问题吗?

Could you please help to solve this issue?

推荐答案

嗨Arpeet Gujarathi,

2013年讨论板允许将附件存储在任何文档库中.下拉列表将列出该站点中显示为该站点的所有文档库 资产库,您就可以访问.讨论区附件将组织到以下文件夹中:库>列表>讨论区列表.

The 2013 discussion board allow attachments to be stored in any document libraries. The drop down list will list all the document libraries in the site that be presented as the site assets library and you have access to. The discussion board attachments will be organized into the following folder: library > Lists > Discussion Board list.

如果您要为upload.aspx页面设置默认目标库,则可能需要使用一些JavaScript代码为upload.aspx上的此下拉列表设置默认值.

If you want to set a default destination library for the upload.aspx page, you may need to use some JavaScript codes to set default value for this drop down list on upload.aspx.

有关更多信息,您可以参考以下线程:

要设置文件的唯一权限,我们可以创建设计器工作流程并自动启动工作流程将文件上传到目标库时.使用端点 下面的内容可中断您启动工作流程的当前项目的继承.

To set the unique permission on the file, we can create a designer workflow and start the workflow automatically when a file is uploaded to the destination library. Use the endpoint below to break inheritance on the current item which you start the workflow. 

[%Workflow Context:Current Site URL%]/_api/lists/getbytitle(‘[%Workflow Context:List Name%]’)/items([%Current Item:ID%])/breakroleinheritance(true)



使用以下端点为用户分配权限.

[%Workflow Context:Current Site URL%]/_api/lists/getbytitle(‘[%Workflow Context:List Name%]’)/items(([%Current Item:ID%])/roleassignments/addroleassignment(principalid=<target principal Id>,roleDefId=1073741829)



有关如何在商品一级设置唯一权限的详细文章:

还有一篇有关如何打破继承并逐步为项目分配权限的文章,供您参考:

http://blog.bullseyeconsulting.com/archive/2014/08/31/conditionally-set-permissions- on-new-documents-in-sharepoint-2013-workflow.aspx

最好的问候,

Linda(张)


这篇关于对通过讨论区上传的文件设置唯一权限.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆