Skip to content

Commit

Permalink
add default user visibility to cli command "admin user create" (go-gi…
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 authored and yardenshoham committed Feb 4, 2023
1 parent 2e12161 commit f698cb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,12 +574,16 @@ func runCreateUser(c *cli.Context) error {
restricted = util.OptionalBoolOf(c.Bool("restricted"))
}

// default user visibility in app.ini
visibility := setting.Service.DefaultUserVisibilityMode

u := &user_model.User{
Name: username,
Email: c.String("email"),
Passwd: password,
IsAdmin: c.Bool("admin"),
MustChangePassword: changePassword,
Visibility: visibility,
}

overwriteDefault := &user_model.CreateUserOverwriteOptions{
Expand Down

0 comments on commit f698cb7

Please sign in to comment.