Make PDP Read-only for certain users or groups

Requirement

There is a particular PDP (say, financial information) which should only be editable by PMO and rest (including PM) should see it in read-only mode.

 

Solution

There were some solutions available on other blogs (see alternative solutions section) but i wanted to have a simpler solution. Its relatively easy to disable the input fields using JavaScript. The interesting part was to do it for certain users (anyone other then PMO) only. I used SharePoint Web part Audience Targeting feature to execute the disabling script only for limited users. Here is the summary of the solution