コード例 #1
0
        public async Task <IActionResult> SaveLDAPAsync([FromForm] LdapSettings ldapConfig)
        {
            // Check authorization
            if (!(await User.IsAdminAsync(_authorizationService)))
            {
                return(Unauthorized());
            }

            // Update config
            await _appSettingsManager.ChangeLdapConfig(ldapConfig);

            // Reload view
            return(RedirectToAction("LDAP"));
        }