diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index db7787f..df38cf5 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,15 +4,10 @@
-
-
-
-
-
+
-
-
+
@@ -159,7 +154,6 @@
-
@@ -184,7 +178,8 @@
-
+
+
true
diff --git a/pkg/internal/services/accounts.go b/pkg/internal/services/accounts.go
index 19acba5..b266f20 100644
--- a/pkg/internal/services/accounts.go
+++ b/pkg/internal/services/accounts.go
@@ -90,12 +90,17 @@ func CreateAccount(name, nick, email, password string) (models.Account, error) {
VerifiedAt: nil,
},
},
- PermNodes: datatypes.JSONMap(viper.GetStringMap("permissions.default")),
+ PermNodes: datatypes.JSONMap{},
ConfirmedAt: nil,
}
if err := database.C.Create(&user).Error; err != nil {
return user, err
+ } else if viper.GetInt("default_user_group") > 0 {
+ database.C.Create(&models.AccountGroupMember{
+ AccountID: user.ID,
+ GroupID: uint(viper.GetInt("default_user_group")),
+ })
}
if tk, err := NewMagicToken(models.ConfirmMagicToken, &user, nil); err != nil {
diff --git a/settings.toml b/settings.toml
index a58aac8..bca1738 100644
--- a/settings.toml
+++ b/settings.toml
@@ -9,6 +9,8 @@ domain = "localhost"
content_endpoint = "https://usercontent.solsynth.dev"
+default_user_group = 1
+
use_registration_magic_token = false
[debug]
@@ -27,12 +29,3 @@ refresh_token_duration = 2592000
[database]
dsn = "host=localhost user=postgres password=password dbname=hy_passport port=5432 sslmode=disable"
prefix = "passport_"
-
-[permissions.default]
-CreatePosts = true
-CreateAttachments = 1048576
-
-[permissions.verified]
-CreateRealms = true
-CreateArticles = true
-CreateAttachments = 26214400