Skip to content

Commit b31307c

Browse files
authored
Ensure that the default visibility is set on the user create page (#16845) (#16862)
Backport #16845 Set the default visibility on the user create page. Fix #16840 Signed-off-by: Andrew Thornton <[email protected]>
1 parent c5193a8 commit b31307c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/admin/user/new.tmpl

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<div class="inline field {{if .Err_Visibility}}error{{end}}">
2929
<span class="inline required field"><label for="visibility">{{.i18n.Tr "settings.visibility"}}</label></span>
3030
<div class="ui selection type dropdown">
31-
<input type="hidden" id="visibility" name="visibility" value="{{.visibility}}">
31+
<input type="hidden" id="visibility" name="visibility" value="{{if .visibility}}{{.visibility}}{{else}}{{printf "%d" .DefaultUserVisibilityMode}}{{end}}">
3232
<div class="text">
3333
{{if .DefaultUserVisibilityMode.IsPublic}}{{.i18n.Tr "settings.visibility.public"}}{{end}}
3434
{{if .DefaultUserVisibilityMode.IsLimited}}{{.i18n.Tr "settings.visibility.limited"}}{{end}}

0 commit comments

Comments
 (0)