I'm attempting to permission a folder using the Object Model API that is created by an ASP.NET page wrapped into a feature. I am able to create and permission the folder for users that are in the appropriate SharePoint role however, I need to permission the folders that are also in more restrictive roles. The folders are created with no problem but I need to break the inheritance and permission the folder.
I attempted to wrap the folder creation/permission code in
SPSecurity.RunWithElevatedPrivileges(delegate() { ... });
I also tried using
web.AllowUnsafeUpdates = true;
and
web.Site.WebApplication.FormDigestSettings.Enabled = false;
...
web.Site.WebApplication.FormDigestSettings.Enabled = true;
The folder is always created however it does not permission properly. Any feedback/direction would be appreciated. Thanks.