Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Anders Hattestad
Dec 18, 2012
  2550
(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
Solving the mystery of high memory usage

Sometimes, my work is easy, the problem could be resolved with one look (when I’m lucky enough to look at where it needs to be looked, just like th...

Quan Mai | Apr 22, 2024 | Syndicated blog

Search & Navigation reporting improvements

From version 16.1.0 there are some updates on the statistics pages: Add pagination to search phrase list Allows choosing a custom date range to get...

Phong | Apr 22, 2024

Optimizely and the never-ending story of the missing globe!

I've worked with Optimizely CMS for 14 years, and there are two things I'm obsessed with: Link validation and the globe that keeps disappearing on...

Tomas Hensrud Gulla | Apr 18, 2024 | Syndicated blog

Visitor Groups Usage Report For Optimizely CMS 12

This add-on offers detailed information on how visitor groups are used and how effective they are within Optimizely CMS. Editors can monitor and...

Adnan Zameer | Apr 18, 2024 | Syndicated blog