Exemplo n.º 1
0
 private void SetAccess(IObjectBuilder builder, List <IAccessRecord> accesses)
 {
     if (accesses.Any())
     {
         foreach (var access in accesses)
         {
             try
             {
                 if (access.Access.AccessLevel != AccessLevel.None)
                 {
                     builder.SetAccessRights(access.OrgUnitId, access.Access.AccessLevel, access.Access.ValidThrough, access.Access.IsInheritable);
                 }
                 else
                 {
                     builder.RemoveAccessRights(access.OrgUnitId);
                 }
             }
             catch (Exception) { }
         }
     }
 }