Try our conversational search powered by Generative AI!

Anders Hattestad
Dec 18, 2012
  2547
(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 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

Azure AI Language – Abstractive Summarisation in Optimizely CMS

In this article, I show how the abstraction summarisation feature provided by the Azure AI Language platform, can be used within Optimizely CMS to...

Anil Patel | Apr 18, 2024 | Syndicated blog

Fix your Search & Navigation (Find) indexing job, please

Once upon a time, a colleague asked me to look into a customer database with weird spikes in database log usage. (You might start to wonder why I a...

Quan Mai | Apr 17, 2024 | Syndicated blog