Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

RunWithElevatedPrivilages, ListViewThreshold and BreakRoleInheritance

$
0
0

Hello all,

I have been trying all ways I can think of to write code that breaks role inheritance on a large list (beyond the list view threshold). Using the UI, a user who is a farm admin can do it, but I need to let non-admins do it, and I thought RunWithElevatedPrivilages would solve it. It doesnt. I also followed advice from another thread and tried setting the clearSubScopes to false -but that made no difference. 

I tried to impersonate the system account using the site.systemaccount user token - same results.

So here is my dilemma - I can shift the code to run in a timer job - where I assume it will work, but I would prefer to have it work as part of my web page. Does anyone have a clue?


Ishai Sagi, SharePoint MVP MCTS in SharePoint Development (WSS & MOSS) Author (2007 how to book): www.tinyurl.com/sharepointbook Author (2010 how to book): www.tinyurl.com/sharepointbook2010 Blog: http://www.sharepoint-tips.com Company: http://www.extelligentdesign.com


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>