开发者

does sharepoint have itemwise permissions , just like it has list wise permissions

( Regarding Moss 2007 )

i have created a sharepoint list in which one column is called user assigned - this is a lookup column of type - people and group.

i select the user开发者_运维技巧s from active directory to enter this field of the list.

So different items in this list have different users assigned

I have create permissions for this list to be read and write to the users in active directory .

so that when a particular user logs in to the sharepoint website with his credentials. he has read and write access to the list.

Now is there any way available in sharepoint by which the user do not see the whole list when they login to the website . He only sees the items of the list which the user assigned field is him only.


If the permissions are indeed setup right, you only have to go to List Settings, Advanced Settings, Item-Level Permissions and on "Read access: Specify which items users can read" you define their own.

If the users are not the creators of the items, you need to go to List Settings, Views (at the far bottom), modify the All Items View (or w/e you have as default), go to the filter section and add a filter like: "Show items only when the following is true", "Show the items when column" Assigned To is equal to [me]


I've been implementing such solutions for some while. It is possible, but

  1. it takes much work to be done
  2. if used in long term and/or the amount of data is large, this will hit performance

If none of these is a problem for you, then you can:

  • create code which performs BreakRoleInheritance() on the item, then adds ViewListitems permission for the user in "user assigned" column. You can find example code, for instance, here: http://social.msdn.microsoft.com/Forums/en/sharepointecm/thread/581e456c-db3c-44f1-b958-a824d95a2536 (or search in Google for "SPPrincipal" and "SPRoleAssignment" for more info)
  • make this code be called whenever the item is added or updated (you have to wait for the "-ed" events, because in the synchronous version of these events you can't change the permissions yet, for instance in "ItemAdding" there is no item created yet). You can achieve this by adding an event handler to the list.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜