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.
- public class VirtualPathVersioningProviderOwn : EPiServer.Web.Hosting.VirtualPathVersioningProvider
- {
- public VirtualPathVersioningProviderOwn(string name, NameValueCollection configParameters)
- : base(name, configParameters) { }
- public override System.Web.Hosting.VirtualDirectory GetDirectory(string virtualPath)
- {
- var cat = base.GetDirectory(virtualPath);
- var cat2 = cat as VersioningDirectory;
- if (cat2 != null)
- {
- if (cat2.ACL.IsReadOnly)
- return cat;
- if (cat2.DirectoryHandler != null && cat2.DirectoryHandler.InternalItem != null)
- cat2.ACL.Creator = cat2.DirectoryHandler.InternalItem.CreatedBy;
- }
- return cat;
- }
- }
Comments