Exemple #1
0
 private void Write(FieldRights rights)
 {
     if (rights != null)
     {
         foreach (var info in rights.Keys.ToArray())
         {
             Write(fieldString, info.Name, rights[info].Mask);
         }
     }
 }
 /// <summary>
 /// Modify field rights.
 /// </summary>
 /// <param name="rights">Rights object to modify</param>
 /// <remarks>Hide the post-it if <see cref="ModifyTableRights"/>
 /// made everything read only because of the trailing '_'.
 /// </remarks>
 public void ModifyFieldRights(FieldRights rights)
 {
     // no changes in field rights
 }
        public void SignalEvent(string sentryAddOnName, string sentryName, SentryState state, FieldRights fieldRights)
        {
            var taskInfo = new SentryTaskInfo()
            {
                AssociateId     = SoContext.CurrentPrincipal.AssociateId,
                AssociateName   = SoContext.CurrentPrincipal.Associate,
                FieldRights     = fieldRights,
                Type            = RightsType.FieldRights,
                SentryName      = sentryName,
                SentryAddOnName = sentryAddOnName,
                State           = state
            };

            // This produces an item and puts it on the queue.
            // A background thread will dequeue the item and process it in SentryRightsDispatcher.ProcessTasks.
            GetDispatcher().Enqueue(taskInfo);
        }