Anders Hattestad
Dec 18, 2012
  2578
(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
Opti ID overview

Opti ID allows you to log in once and switch between Optimizely products using Okta, Entra ID, or a local account. You can also manage all your use...

K Khan | Jul 26, 2024

Getting Started with Optimizely SaaS using Next.js Starter App - Extend a component - Part 3

This is the final part of our Optimizely SaaS CMS proof-of-concept (POC) blog series. In this post, we'll dive into extending a component within th...

Raghavendra Murthy | Jul 23, 2024 | Syndicated blog

Optimizely Graph – Faceting with Geta Categories

Overview As Optimizely Graph (and Content Cloud SaaS) makes its global debut, it is known that there are going to be some bugs and quirks. One of t...

Eric Markson | Jul 22, 2024 | Syndicated blog

Integration Bynder (DAM) with Optimizely

Bynder is a comprehensive digital asset management (DAM) platform that enables businesses to efficiently manage, store, organize, and share their...

Sanjay Kumar | Jul 22, 2024