Example #1
0
 private void UpdateHeaderRow(PermissionCheckHeaderRow headerRow, PermissionCheckResult checkResult)
 {
     Program.AssertOffEventThread();
     Program.Invoke(this, delegate
     {
         headerRow.SetPermissionCheckInProgress(false);
         headerRow.UpdateDescription(checkResult);
     });
 }
Example #2
0
        private PermissionCheckHeaderRow AddHeaderRow(IXenConnection connection)
        {
            Program.AssertOffEventThread();

            string text = string.Format(Messages.RBAC_WARNING_PAGE_HEADER_ROW_DESC, connection.Session.UserFriendlyName,
                                        connection.Session.FriendlyRoleDescription, connection.FriendlyName);
            PermissionCheckHeaderRow headerRow = new PermissionCheckHeaderRow(text);

            Program.Invoke(this, delegate
            {
                headerRow.SetPermissionCheckInProgress(true);
                dataGridViewEx1.Rows.Add(headerRow);
            });
            return(headerRow);
        }
Example #3
0
        private void RetrieveRBACWarnings()
        {
            SetUpdating();
            foreach (var connectionChecks in checksPerConnectionDict)
            {
                IXenConnection           connection  = connectionChecks.Key;
                PermissionCheckHeaderRow headerRow   = AddHeaderRow(connection);
                PermissionCheckResult    checkResult = PermissionCheckResult.OK;

                if (connection.Session.IsLocalSuperuser || connectionChecks.Value.Count == 0)
                {
                    SetNoWarnings();
                }
                else
                {
                    List <WizardPermissionCheck> errors;
                    List <WizardPermissionCheck> warnings;
                    checkResult = RunPermissionChecks(connection, connectionChecks.Value, out errors, out warnings);
                    switch (checkResult)
                    {
                    case PermissionCheckResult.OK:
                        SetNoWarnings();
                        break;

                    case PermissionCheckResult.Warning:
                        AddWarnings(connection, warnings);
                        break;

                    case PermissionCheckResult.Failed:
                        AddErrors(connection, errors);
                        break;
                    }
                }
                UpdateHeaderRow(headerRow, checkResult);
            }
            FinishedUpdating();
        }
Example #4
0
 private void UpdateHeaderRow(PermissionCheckHeaderRow headerRow, PermissionCheckResult checkResult)
 {
     Program.AssertOffEventThread();
     Program.Invoke(this, delegate
                              {
                                  headerRow.SetPermissionCheckInProgress(false);
                                  headerRow.UpdateDescription(checkResult);
                              });
 }
Example #5
0
        private PermissionCheckHeaderRow AddHeaderRow(IXenConnection connection)
        {
            Program.AssertOffEventThread();

            string text = string.Format(Messages.RBAC_WARNING_PAGE_HEADER_ROW_DESC, connection.Session.UserFriendlyName,
                                        connection.Session.FriendlyRoleDescription, connection.FriendlyName);
            PermissionCheckHeaderRow headerRow = new PermissionCheckHeaderRow(text);
            Program.Invoke(this, delegate
                                     {
                                         headerRow.SetPermissionCheckInProgress(true);
                                         dataGridViewEx1.Rows.Add(headerRow);
                                     });
            return headerRow;
        }