From a356803594ab36fa69e7dbcbd79261d8b46f4262 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 12 Oct 2025 00:05:30 +0530 Subject: removed useless user fields and functions, added roles --- conf/conf.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'conf/conf.go') diff --git a/conf/conf.go b/conf/conf.go index 843bbea..4aa2bcd 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -1,5 +1,5 @@ /* openbills - Server for web based Libre Billing Software - * Copyright (C) 2023-2024 Vidhu Kant Sharma + * Copyright (C) 2023-2025 Vidhu Kant Sharma * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -35,11 +35,6 @@ func validateConf() { ok = false } - if viper.GetInt("username.min_username_length") < 1 { - log.Println("\x1b[41m\x1b[30m[err]\x1b[0m Minimum username length must be greater than 0.") - ok = false - } - minPassLen := viper.GetInt("security.min_password_length") maxPassLen := viper.GetInt("security.max_password_length") @@ -95,10 +90,6 @@ func init() { viper.SetDefault("instance.description", "Libre Billing Software") viper.SetDefault("instance.url", "https://openbills.vidhukant.com") - viper.SetDefault("username.allowed_characters", "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789.-_") - viper.SetDefault("username.min_username_length", 2) - viper.SetDefault("username.max_username_length", 20) - viper.SetDefault("cryptography.password_hashing_cost", bcrypt.DefaultCost) viper.SetDefault("data.upload_dir", "./data/") -- cgit v1.2.3