0

We created a customized data form web part, and there are some items don't want user with specified permission level (or group) to view.

Could give some help on how to do this, or whether we could do this in data form web part?

1

I assume you have setup User Profile Syncronization. There is a Filter Web Part for that, which should be able to benefit you from the Connectable web parts framework. Have a look here to see how is being used http://www.bjw.co.nz/developer/sharepoint-2010/97-using-a-current-user-filter-on-a-list

To filter out items based on assigned permissions you could use the extension function in ddwrt: ifHasRights example here http://sharepointjim.wordpress.com/2009/10/19/sharepoint-data-view-conditional-formatting-based-on-user-permissions-ifhasrights/

Otherwise you can only do it by code.

Hope it helps, C:\Marius

  • Hi, Thanks for your reply, but this is not what I want, I don't want to filter data by people column. There are some items status is like "Pending", and the users in final user group should not view them. – 夏至夕陽 May 9 '12 at 2:15
  • not sure ootb you can achieve it, close to what you want i've edited my answer. – Marius Constantinescu - MVP May 9 '12 at 7:08
  • Thank you very much, you open a new window for me:) Could I ask is there any ddwrt to check whether the user is in a group? – 夏至夕陽 May 9 '12 at 8:02
  • All available functions are here explained msdn.microsoft.com/en-us/library/dd583143(v=office.11).aspx, and NO there is not, but you could extend it yourself see here blog.mastykarz.nl/… (same principles apply to DVWP or XVWP) – Marius Constantinescu - MVP May 9 '12 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.