示例#1
0
 internal void Persist([NotNull] TaskFolder folder, AccessControlSections includeSections = Task.defaultAccessControlSections)
 {
     WriteLock();
     try
     {
         AccessControlSections accessControlSectionsFromChanges = GetAccessControlSectionsFromChanges();
         if (accessControlSectionsFromChanges != AccessControlSections.None)
         {
             folder.SetSecurityDescriptorSddlForm(GetSecurityDescriptorSddlForm(accessControlSectionsFromChanges));
             OwnerModified = GroupModified = AccessRulesModified = AuditRulesModified = false;
         }
     }
     finally
     {
         WriteUnlock();
     }
 }
示例#2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TaskSecurity" /> class with the specified sections of the access control security rules from the specified task.
 /// </summary>
 /// <param name="folder">The folder.</param>
 /// <param name="sections">The sections of the ACL to retrieve.</param>
 public TaskSecurity([NotNull] TaskFolder folder, AccessControlSections sections = Task.defaultAccessControlSections)
     : base(false)
 {
     SetSecurityDescriptorSddlForm(folder.GetSecurityDescriptorSddlForm(Convert(sections)), sections);
     this.CanonicalizeAccessRules();
 }