aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/conf
diff options
context:
space:
mode:
authorVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 00:05:30 +0530
committerVidhu Kant Sharma <vidhukant@vidhukant.com>2025-10-12 00:05:30 +0530
commita356803594ab36fa69e7dbcbd79261d8b46f4262 (patch)
tree0146efe4c52b1c65c1967ab1f412306c410c10d4 /conf
parent193be465b21838d2796fafbe1c5d9854038a3f8c (diff)
removed useless user fields and functions, added rolesHEADv0.19.0master
Diffstat (limited to 'conf')
-rw-r--r--conf/conf.go11
1 files changed, 1 insertions, 10 deletions
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 <vidhukant@vidhukant.com>
+ * Copyright (C) 2023-2025 Vidhu Kant Sharma <vidhukant@vidhukant.com>
*
* 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/")