SharePoint/WSS:修改“创建者” 场地?
全部 -
我正在使用 WSS 3.0。 目前,HR 会将员工的公司内部简历上传到我们网站上的文档库,但出于隐私原因,我们必须限制对该文档库的访问,这迫使用户每次想要更新简历时都必须通过 HR。
我的想法是创建一个启用附件的列表,允许用户仅查看/编辑自己的项目,然后授予 HR 管理所有条目的权限。 例外情况是 HR 需要创建初始列表项并附加简历,这意味着列表项将“由 {hr} 创建”,并且附加简历的最终用户不可见/不可编辑。
关于如何允许人力资源部修改上传时的“创建者”字段以便最终用户可以看到并可以编辑他们的简历,或者以不同的方式进行此操作,有什么想法吗?
谢谢!
All -
I am using WSS 3.0. Currently, HR will upload an employee's internal company resume to a document library on our site, but for privacy reasons, we must then restrict access to that document library, which forces users to then go through HR each time they want to update their resume.
My thought is to create a list with attachments enabled that allows users to only view/edit their own items, and then give HR permission to manage all entries. This works with the exception that HR will need to create the initial list item and attach the resume, which means the list item will be "created by {hr}" and not visible/editable by the end user whose resume is attached.
Any ideas on how I can either allow HR to modify the "created by" field on upload so end users will see and can edit their resume, or go about this in a different way?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
创建一个文档库来保存简历。 然后授予人力资源部门(SharePoint 用户组)对库的“读/写所有”权限,并授予其他人“读/写您自己的”权限。根据以下内容创建一个名为“简历”的内容类型:然后添加一个包含简历所关注的员工(SPUser 字段)的字段(以及任何其他必需字段,即姓名、地址等)。 (使字段成为必填项)。
然后,编写一个绑定到您刚刚创建的内容类型的 itemeventreceiver 并覆盖 ItemUpdated 事件。
代码如下所示:
您可以使用 FeatureReceiver 将 ItemEventReceiver 绑定到内容类型,如下所示:
Create a document library to hold the resume's. Then give the HR department (SharePoint User group) "read / write all" permissions on the library, the give everyone else read / write your own" rights. Create a Content Type called "Resume" based on the out-of-the-box Document content type. Then add a field that contains the Employee (SPUser field) whom the resume concerns to the content type (and any other fields required, i.e. name, address etc.). Have HR fill this in correctly when creating the listitem (make the fields required).
Then, write a itemeventreceiver bound to the content type you just created and override the ItemUpdated event.
The code would be something like the following:
you can bind the ItemEventReceiver using a FeatureReceiver to the content type like so:
为什么不直接使用文档库来保存简历呢? (而不是带有附件的列表。)您可以向 HR 授予对其中所有文档的完全读/写权限,并且简历的所有者将仅拥有对自己的简历进行贡献的权限。
Why not just use a document library for the resumes? (instead of a list w/ attachments.) You can give HR full read/write to all documents within, and the owner of the resume will have contribute permissions to only their own resume.
我找到了一种使用 SharePoint Designer 更改“创建者”字段来创建工作流的方法。
XYZZY。 使其成为“个人或团体”字段。
I found a way to change the Created By field using SharePoint Designer to create a workflow.
XYZZY. Make it a "person or group" field.
使用自定义上传屏幕,您可以在上传之前更改当前用户的上下文。 它需要使用类似以下内容查找用户令牌(这些是工作代码片段,其中包含错误处理和删除的其他内容)。 请注意,EnsureUser 将要求当前用户基本上是管理员/所有者。
With a custom upload screen you could change the context of the current user before doing the upload. It requires looking up the user token using something like the following (these are snippets of working code with error handling and other stuff removed). Note that EnsureUser will require that the current user basically be an admin/owner.
我遇到过类似的情况(迁移到共享点),我必须将具有管理员用户的文件添加到文档库,然后“更改”用户。 我是这样做的,可能会对你有所帮助:
I had a similar situation (migration into sharepoint) where I had to add a file with the admin user to a doc library and then "change" the users. I did it like this, might help you somewhat: