Beispiel #1
0
        private void UpdateSecurityControls()
        {
            if (cboUser.SelectedItem != null && cboDomain.SelectedItem != null)
            {
                // Update Security Infos and the owner's controls
                owner.SecurityManager.CurrentRole = (StandardRole)cboUser.SelectedItem;
                owner.UpdateSecurityInfoCtrls();

                char domainName = (char)cboDomain.SelectedItem;
                SecurityDemoHelper.UpdatePermissionTableCtrls(owner.SecurityManager, permissionsPanel, domainName, Dataweb.NShape.SecurityAccess.View);
                SecurityDemoHelper.UpdatePermissionTableCtrls(owner.SecurityManager, permissionsPanel, domainName, Dataweb.NShape.SecurityAccess.Modify);
            }
        }
Beispiel #2
0
        /// <summary>
        /// Update all controls that display security information
        /// </summary>
        public void UpdateSecurityInfoCtrls()
        {
            if (cboUser.SelectedItem == null || (StandardRole)cboUser.SelectedItem != SecurityManager.CurrentRole)
            {
                cboUser.SelectedItem = SecurityManager.CurrentRole;
            }
            char domainName = (char)(cboDomain.SelectedItem ?? SecurityDemoHelper.NoDomain);

            SecurityDemoHelper.UpdatePermissionTableCtrls(SecurityManager, domainPermissionInfoPanel, domainName, SecurityAccess.View);
            SecurityDemoHelper.UpdatePermissionTableCtrls(SecurityManager, domainPermissionInfoPanel, domainName, SecurityAccess.Modify);
            UpdateDomainPermissionCtrls();

            // Update displayed properties
            propertyGrid1.Refresh();
        }