November Happy Hour will be moved to Thursday December 5th.

Anders Hattestad
Dec 18, 2012
  2631
(1 votes)

Virtual role: Creator in VPP not working

If you set up a Versioning VPP fil system in EpiServer 6R2 the role creator will not work. This is becasue it’s not in the ACL.

There is a fix for it, but it will only work for the creator of the folder. You need to use this code as your VPP provider instead of the orgianal VirtualPathVersioningProvider.

Code Snippet
  1. public class VirtualPathVersioningProviderOwn : EPiServer.Web.Hosting.VirtualPathVersioningProvider
  2. {
  3.     public VirtualPathVersioningProviderOwn(string name, NameValueCollection configParameters)
  4.         : base(name, configParameters) { }
  5.     public override System.Web.Hosting.VirtualDirectory GetDirectory(string virtualPath)
  6.     {
  7.         var cat = base.GetDirectory(virtualPath);
  8.         var cat2 = cat as VersioningDirectory;
  9.         if (cat2 != null)
  10.         {
  11.             if (cat2.ACL.IsReadOnly)
  12.                 return cat;
  13.             if (cat2.DirectoryHandler != null && cat2.DirectoryHandler.InternalItem != null)
  14.                 cat2.ACL.Creator = cat2.DirectoryHandler.InternalItem.CreatedBy;
  15.         }
  16.  
  17.         return cat;
  18.     }
  19. }
Dec 18, 2012

Comments

Please login to comment.
Latest blogs
Optimizely SaaS CMS + Coveo Search Page

Short on time but need a listing feature with filters, pagination, and sorting? Create a fully functional Coveo-powered search page driven by data...

Damian Smutek | Nov 21, 2024 | Syndicated blog

Optimizely SaaS CMS DAM Picker (Interim)

Simplify your Optimizely SaaS CMS workflow with the Interim DAM Picker Chrome extension. Seamlessly integrate your DAM system, streamlining asset...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Optimizely CMS Roadmap

Explore Optimizely CMS's latest roadmap, packed with developer-focused updates. From SaaS speed to Visual Builder enhancements, developer tooling...

Andy Blyth | Nov 21, 2024 | Syndicated blog

Set Default Culture in Optimizely CMS 12

Take control over culture-specific operations like date and time formatting.

Tomas Hensrud Gulla | Nov 15, 2024 | Syndicated blog