mirror of
				https://github.com/NginxProxyManager/nginx-proxy-manager.git
				synced 2025-10-30 23:33:34 +00:00 
			
		
		
		
	Fix ci clearing users not clearing auth
This commit is contained in:
		| @@ -89,10 +89,23 @@ func List(pageInfo model.PageInfo, filters []model.Filter, expand []string) (ent | |||||||
| // DeleteAll will do just that, and should only be used for testing purposes. | // DeleteAll will do just that, and should only be used for testing purposes. | ||||||
| func DeleteAll() error { | func DeleteAll() error { | ||||||
| 	db := database.GetDB() | 	db := database.GetDB() | ||||||
| 	result := db.Exec(fmt.Sprintf(`DELETE FROM %s WHERE is_system = ?`, database.QuoteTableName("user")), false) | 	if result := db.Exec( | ||||||
|  | 		fmt.Sprintf(`DELETE FROM %s WHERE is_system = ?`, database.QuoteTableName("user")), | ||||||
|  | 		false, | ||||||
|  | 	); result.Error != nil { | ||||||
| 		return result.Error | 		return result.Error | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	if result := db.Exec( | ||||||
|  | 		fmt.Sprintf(`DELETE FROM %s`, database.QuoteTableName("auth")), | ||||||
|  | 		false, | ||||||
|  | 	); result.Error != nil { | ||||||
|  | 		return result.Error | ||||||
|  | 	} | ||||||
|  |  | ||||||
|  | 	return nil | ||||||
|  | } | ||||||
|  |  | ||||||
| // GetCapabilities gets capabilities for a user | // GetCapabilities gets capabilities for a user | ||||||
| func GetCapabilities(userID uint) ([]string, error) { | func GetCapabilities(userID uint) ([]string, error) { | ||||||
| 	capabilities := make([]string, 0) | 	capabilities := make([]string, 0) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user