/// <summary>
        ///     Removes the database users/logins that were created by the
        ///     authorization service the next time the service starts up
        /// </summary>
        /// <externalUnit/>
        /// <revision revisor="dev14" date="3/9/2010" version="1.1.7.16">
        ///     Member Created
        /// </revision>
        public void ResetAuthUsers()
        {
            // get all the users
            List <Credential> users = dataService.GetAllDatabaseUsers();

            // remove them
            foreach (Credential credential in users)
            {
                dataService.DeleteUser(
                    credential.DatabaseName, credential.CurrentUser);
            }
        }
Ejemplo n.º 2
0
        public async Task <ValidationResult> DeleteUser(string userId)
        {
            var result = new ValidationResult();

            try
            {
                result.Succeeded = await _authorizationDataService.DeleteUser(userId);
            }
            catch (Exception ex)
            {
                result.Succeeded = false;
                result.Exception = ex;
                result.Errors    = new string[1] {
                    ex.Message
                };
            }

            return(result);
        }