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)
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()?
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();
}