fix: self-registered users don't get execute perms

This commit is contained in:
Henrique Dias 2026-03-28 19:08:19 +01:00
parent 2368e468b9
commit b6a4fb1f27
No known key found for this signature in database

View file

@ -171,6 +171,12 @@ var signupHandler = func(_ http.ResponseWriter, r *http.Request, d *data) (int,
// if that is the default permission.
user.Perm.Admin = false
// Self-registered users should not inherit execution capabilities from
// default settings, regardless of what the administrator has configured
// as the default. Execution rights must be explicitly granted by an admin.
user.Perm.Execute = false
user.Commands = []string{}
pwd, err := users.ValidateAndHashPwd(info.Password, d.settings.MinimumPasswordLength)
if err != nil {
return http.StatusBadRequest, err