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

Ignoring acl settings for UnifiedDirectory

Vote:
 

Hi, trying to add access for a group to a UnifiedDirectory folder with following code. Everything look ok while debugging, after acl.add the key is added for my group but method Save don´t seem to save the changes. Anyone got any ideas?

 

public static void AddFolderAccessForGroup(UnifiedDirectory folder, AccessControlEntry ace)

{

var acl = folder.ACL.CreateWritableClone();

acl.IsInherited = false;

if (acl.Exists(ace.Name))

{

acl.Remove(ace.Name);

}

acl.Add(ace);

acl.Save();

}

 

 

#76068
Oct 16, 2013 14:03
Vote:
 

What kind of Provider is your folder in? For example VirtualPathNativeProvider or VirtualPathVersioningProvider?

#76082
Oct 16, 2013 16:00
Ted
Vote:
 

Been a while since I did any work with ACLs, but I think you might have to assign that ACL to your UnifiedDirectory once you've saved the ACL. Not sure if the ACL property has a setter, but can you do folder.ACL = acl; after acl.Save()?

#76102
Oct 16, 2013 23:35
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.